Guillaume Petitjean
Guillaume Petitjean

Reputation: 2718

Quit gdb while the target keeps running on STM32H7

I am working on a device with two STM32H7 (for the moment two STM32H7 EVAL2 boards). I want to debug on one (with STMicro Cube IDE) and just be able to restart (reset and run) the second one. I am debugging remotely so I don't want to press the board reset button.

My idea is to use STLink gdbserver (that I already use for the remote debug of the first MCU) only to reset and run the second MCU.

I was able to reset and run the target only with the continue command but this command is blocking GDB.

arm-none-eabi-gdb -q -ex "set confirm off" -ex "target remote xxx" -ex "monitor halt reset", -ex "continue"

The command run is not supported.

Is it possible to reset and run a target then quit GDB while the target keeps running?

Upvotes: 1

Views: 641

Answers (1)

Andrew
Andrew

Reputation: 4771

After connecting to the target with target remote ... you should be able to use the detach command. This will tell GDB to close the remote connection but leave the remote running.

Once detached you should be able to quit GDB without causing your remote target to be killed.

Upvotes: 1

Related Questions