1
votes

I am using Eclipse + GDB Hardware Debugging + OpenOCD + STM32F4DISCOVERY (over ST-LINK)

All work OK.

After completion of the debugging, target CPU is still in the Halt mode. How to make so that after the debug (Terminate pressed) target CPU reset or continued to work?

2
Guessing: try disconnect (detach) instead of terminate.dbrank0

2 Answers

1
votes

I'm doing this in this way:

  1. Writing a bash-script which connects via Telenet to OpenOCD and excecutes the run or reset command.
    1. Run the script via the external-tools-feature of eclipse
    2. May create a Launchgroup which runs the script as external tool after debugging.

Here is a script-example:

#!/bin/bash
{ 
    echo "reset halt";
    echo "reset run";
} | telnet localhost 4444
0
votes

I configure openocd to resume execution when gdb session ends.

Create openocd-gdb.cfg containing :

$_TARGETNAME configure -event gdb-detach {
    resume
}

Load the file, after the target file, when running openocd :

openocd -f target/stm32f4.cfg -f openocd-gdb.cfg