Openocd / gdb -- quick Q (i hope)

i’ve seen people using stlink/SWD for programming their braids etc, so i wondered whether anybody could help me out (?)

i’m trying to program a frames – which seems to work, at least up to a point. as far as i can tell gdb isn’t complaining, but the module isn’t showing any signs of being alive. here’s the output of my gdb session (loading frames.elf):

(gdb) monitor reset halt
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
(gdb) load
Loading section .text, size 0x6c10 lma 0x8004000
Loading section .data, size 0x20 lma 0x800ac10
Start address 0x8004000, load size 27696
Transfer rate: 14 KB/sec, 9232 bytes/write.
(gdb) continue
Continuing.

i didn’t get the upload_combo_jtag thing to work with SWD, so i’m using openocd like so: openocd -f interface/stlink-v2.cfg -f target/stm32f1x_stlink.cfg

ie the standard interface/target scripts which come with openocd. any hints?

Have you loaded the bootloader?

The processor executes code at 0x8000000 when it boots. On a working Frames, the bootloader is there. The bootloader checks if it should go into firmware update mode, otherwise it jumps to 0x8004000 where the application code starts.

ah, thank you, olivier.

that was that. i’ve only seen stm32f10x.cfg has 0x8000000, but i hadn’t loaded the bootloader.

“flash write_image frames_bootloader_combo.hex” did it.