Hi, I've got an Olimex STM32-P103 board and a wiggler to connect openocd to the board. I'm using Open On-Chip Debugger 0.1.0 (2009-01-22-10:03) Release.
If I build my STM32 app with gcc -O0 ... (no optimisation) openocd has no problem flashing the binary. However, if I build with -O2 or -Os, or I use -ffunction-sections -fdata-sections and -Wl,-gc-sections, openocd doesn't like to flash the CPU. I do not yet understand how the binary contents affect flashing the CPU. This is what openocd says.. > reset init JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3) JTAG tap: stm32.bs tap/device found: 0x16410041 (Manufacturer: 0x020, Part: 0x6410, Version: 0x1) target state: halted target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x00003e90 > flash erase_sector 0 0 127 erased sectors 0 through 127 on flash bank 0 in 0.041680s > flash write_bank 0 ./obj/ct_in.bin 0 BUG: keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1079) timed out while waiting for target halted error executing stm32x flash write algorithm flash writing failed with error code: 0xfffffc7a error writing to flash at address 0x08000000 at offset 0x00000000 (-902) called at file "command.c", line 456 called at file "embedded:startup.tcl", line 89 called at file "embedded:startup.tcl", line 93 Is this an openocd bug, or have I done/not done something in openocd? Cheers, James. _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development