STM32VL Debug

Discussions and support about ChibiStudio, the free development environment for ARM.
Post Reply
StuntMonkeh
Posts: 5
Joined: Tue Jun 18, 2013 11:01 pm

STM32VL Debug

Post by StuntMonkeh »

I am trying to run the demo code for the STM32VL board using ChibiStudio.

Image

What am I doing wrong?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32VL Debug

Post by Giovanni »

Hi,

I see two problems there:
1) You have to select the project right before launching the debugger, it is an Eclipse quirk. That message is caused by that.
2) You have to select ST-Link V1. V2 is for newer Discovery kits.

Giovanni
StuntMonkeh
Posts: 5
Joined: Tue Jun 18, 2013 11:01 pm

Re: STM32VL Debug

Post by StuntMonkeh »

I got a step closer. After I select 'stm32vldiscovery.cfg' I get the following error in the console.

Code: Select all

Licensed under GNU GPL v2
For bug reports, read
   http://openocd.sourceforge.net/doc/doxygen/bugs.html
Warn : Interface already configured, ignoring
Error: already specified hl_layout stlink
Info : This adapter doesn't support configurable speed
Error: open failed
in procedure 'transport'
in procedure 'init'
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32VL Debug

Post by Giovanni »

If I remember well somebody else reported this problem with the VL, I don't have one at hard to make a test. This issue is probably not specific of ChibiStudio but more general with OpenOCD.
You may try to search in the OpenOCD forum and mailing list if similar problems have been reported for the ST-Link V1.

Anybody else could make a test?

Giovanni
Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm

Re: STM32VL Debug

Post by Abhishek »

For ST-LINK v1, you have to replace default Mass Storage drivers with the WinUSB or libusb drivers using the zadig utility.

This should solve it for you.

Regards
Abhishek
StuntMonkeh
Posts: 5
Joined: Tue Jun 18, 2013 11:01 pm

Re: STM32VL Debug

Post by StuntMonkeh »

Abhishek wrote:For ST-LINK v1, you have to replace default Mass Storage drivers with the WinUSB or libusb drivers using the zadig utility.


I tried both drivers. Unfortunately they didn't work. I have tried on two different PC's, always the same problem.

I can see how its a OpenOCD problem but I dont know how to fix it.
pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

Re: STM32VL Debug

Post by pito »

Hi, is there any update on what exactly shall be done to run debug with stm32vldisco and the newest CBS5?
Getting error (as above) with any .cfg related to stm32f1.. from target dir..
:?
PS: I've installed the https://sourceforge.net/projects/libwdi/files/zadig/ utility and updated the old driver with WinUSB driver. It does something now..
PS1: I had to set Option>List All Devices (in zadig's tool) in order to see the old driver (while stm32vl connected and all other usb stuff disconnected) and then replaced with WinUSB.
pito
Posts: 199
Joined: Sun Nov 06, 2011 3:54 pm

Re: STM32VL Debug

Post by pito »

I cannot get it working, however. The stlink communicates, but I get errors like:

Code: Select all

Open On-Chip Debugger 0.7.0 (2013-05-05-10:41)
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : This adapter doesn't support configurable speed
Info : STLINK v1 JTAG v12 API v2 SWIM v0 VID 0x0483 PID 0x3744
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting 'gdb' connection from 3333
Info : device id = 0x10016420
Info : flash size = 128kbytes
Warn : acknowledgment received, but no packet pending
undefined debug reason 6 - target needs reset
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080001e0 msp: 0x20000400
Info : Padding image section 0 with 8 bytes
Error: timeout waiting for algorithm, a target reset is recommended
Error: flash write failed at address 0x8000000
Error: error writing to flash at address 0x08000000 at offset 0x00000000
Warn : The target is not in the halted nor running stated, stepi/continue ignored.
Warn : target not halted
Error: address + size wrapped(0xfffffffe, 0x00000004)
Error: address + size wrapped(0xfffffffe, 0x00000004)
Warn : The target is not in the halted nor running stated, stepi/continue ignored.
Warn : target not halted
Error: address + size wrapped(0xfffffffe, 0x00000004)
Error: address + size wrapped(0xfffffffe, 0x00000004)


Ok, I have to choose the stm32vl "board" .cfg, not the "target" .cfg.. Confused by the word "target" in the openocd dropdown item description.. :roll:
Post Reply