SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By Mape
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
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?
By hsutherl
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.