Page 1 of 1

STM32VL Debug

Posted: Mon Jun 24, 2013 6:14 pm
by StuntMonkeh
I am trying to run the demo code for the STM32VL board using ChibiStudio.

Image

What am I doing wrong?

Re: STM32VL Debug

Posted: Mon Jun 24, 2013 6:21 pm
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

Re: STM32VL Debug

Posted: Mon Jun 24, 2013 8:54 pm
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'

Re: STM32VL Debug

Posted: Mon Jun 24, 2013 9:49 pm
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

Re: STM32VL Debug

Posted: Tue Jun 25, 2013 11:34 am
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

Re: STM32VL Debug

Posted: Tue Jul 02, 2013 4:35 pm
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.

Re: STM32VL Debug

Posted: Fri Sep 20, 2013 7:10 pm
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.

Re: STM32VL Debug

Posted: Fri Sep 20, 2013 8:25 pm
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: