STLINK2+SWD, OpenOCD 0.8, programming

Open source ARM Debugger

Moderator: phalanx

Post Reply
Mape
Posts: 1
Joined: Sat Nov 29, 2014 2:01 pm

STLINK2+SWD, OpenOCD 0.8, programming

Post by Mape » Sat Nov 29, 2014 2:35 pm

I'm successfully using STM32F10x + STLINKV2.0-SWD + OOCD0.8 for gcc-gdb-debugging.
I also successfully use STLINK-UTILITY for programming this HW.

The same configuration STM32F10x + STLINKV2.0-SWD + OOCD0.8 does not work for programming.
I have done many trials with "flash wite_image" and "program" command.
It looks like this or similar:

Code: Select all

c:\Programm\openocd-0.8.0\bin\openocd-0.8.0.exe -f interface/stlink-v2.cfg -f target/stm32_stlink.cfg -c "program out/Wasserspiele.bin 0x08000000" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-04-28-08:39)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
0
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v21 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.271419
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080012d0 msp: 0x20001c30
** Programming Started **
** Programming Failed **
shutdown command invoked
I know that STM32 shall be "programmed under reset", but the reset line
of STLINKV2-SWD is not connected. Even when connected, there would be no signal
on it. Obviously the reset line is actually not needed because STlink utility works nice without reset.

Does anybody have any other idea?

hsutherl
Posts: 182
Joined: Sun Jun 07, 2009 6:24 am

Re: STLINK2+SWD, OpenOCD 0.8, programming

Post by hsutherl » Mon Dec 01, 2014 8:24 pm

The (telnet) sequence that works reliably for me on the Discovery boards is

Code: Select all

reset halt
flash write_image erase path/to-hexfile 0 ihex
With that said, I don't actually have an F10x Discovery board. I'll try to use one of those boards to program a F10x and report back.

Post Reply