OpenOCD 8, Eclipse and STm32F4Discovery

Hello,

I have been successfully using OpenOCD, Eclipse and Stm32F4Discovery. An excellent tutorial as to how to get this going is http://embeddedprogrammer.blogspot.co.u … h-gcc.html.

This has worked really well for me with OpenOCD 7, I can single step, watch variables, etc., but after moving to OpenOCD 8 I find I can no longer debug and step through the code. I am using the standard scripts (stm32f4discovery.cfg) which come with OpenOCD.

The board will program, but when I use “monitor reset halt” instead of “monitor soft_reset_halt” Eclipse will complain “Target request failed: The program is not being run”

The issue appears to be to do with “monitor soft_reset_halt.” I have searched and found that I should be using “monitor reset [halt|init]” instead, but no combination gets me back to a working system. My original script that works with OpenOCD7 is as below. Suggestions as to what to change would be most appreciated.

Thanks for your time.

File :

set remote hardware-breakpoint-limit 6

set remote hardware-watchpoint-limit 4

target remote localhost:3333

monitor halt

monitor poll

monitor flash probe 0

monitor flash protect 0 0 11 off

monitor reset halt

monitor flash erase_sector 0 0 11

monitor flash write_image c:/projects/eclipse/Blonky/Debug/Blonky.elf

monitor soft_reset_halt

monitor arm semihosting enable

Output :

source C:\openocd-0.8.0\bin-x64\blonky_gdb.script

Reset_Handler () at …\libs\CMSIS\src\startup_cm.c:217

217 {

background polling: on

TAP: stm32f4x.cpu (enabled)

target state: halted

target halted due to breakpoint, current mode: Thread

xPSR: 0x01000000 pc: 0x080001d8 msp: 0x10010000

device id = 0x10016413

flash size = 1024kbytes

flash ‘stm32f2x’ found at 0x08000000

cleared protection for sectors 0 through 11 on flash bank 0

target state: halted

target halted due to debug-request, current mode: Thread

xPSR: 0x01000000 pc: 0x080001d8 msp: 0x10010000

erased sectors 0 through 11 on flash bank 0 in 15.998915s

target state: halted

target halted due to breakpoint, current mode: Thread

xPSR: 0x61000000 pc: 0x20000042 msp: 0x10010000

no flash bank found for address 10000100

no flash bank found for address 40024000

wrote 140492 bytes from file c:/projects/eclipse/Blonky/Debug/Blonky.elf in 3.095177s (44.327 KiB/s)

target state: halted

target halted due to debug-request, current mode: Thread

xPSR: 0x01000000 pc: 0x080001d8 msp: 0x10010000

semihosting is enabled

Note: automatically using hardware breakpoints for read-only addresses.