2022-09-05 04:48 AM
I want to remotely reset and start a STM32H753 eval board.
The board is connected to a PC through STLink and on this PC I run STLink-gdb-server in persistent mode.
ST-LINK_gdbserver.exe -d -e -v -p 61234 -a 400000000 -b 200 -i *** -cp "***"
On my development PC, I want to use gdb to reset the target, start execution.
The following works except that if I execute the command a second time, it terminates the gdbserver executable.
$(GDB) -q -ex "set confirm off" -ex "target extended-remote ***:61234" -ex "monitor reset halt" -ex "detach" -ex "quit"
According to gdb user manual, the detach command should not terminate gdbserver in "extended-remote" mode.
i tried several variations of the gdb command line but none of them is working.
Any idea ?
2022-09-06 05:24 AM
Hi,
We are able to re-produce the behavior on our machines, not necessarily the second time, but certainly reproducible.
extended-remote is not likely associated with this problem. Debug on-going on our side...
As a work-around you could launch the ST-LINK GDB-server from a bat-file which re-launches it as soon as the GDB-client has completed your debug command:
:loop
ST-LINK_gdbserver.exe -d -v -p 61234 -a 400000000 -b 200 -i *** -cp "***"
goto loop
Please notice "-e" (persistent mode) is removed from above suggested work-around since we rely on a loop instead...
Internal ticket reference: 134147
2022-09-06 11:36 PM
hello,
Looping on gdbserver is not working. I think this is because it starts a new gdbserver after the target has been reset and started, so my guess is that the new gdbserver stops the execution on the target.