Open marcusb opened 1 month ago
What is going on in the terminal tab where you see the gdb-server output appears?
We only sent 11 commands to gdb before failure. You can see how OpenOCD and GDB are launched and you can launch them the same way and send the same gdb commands and see what happens It appears gdb is not happy with what openocd is sending. We don't talk to openocd at all. Maybe a very old/incomplete version of openocd?
11-target-select extended-remote localhost:50000
-> 11^error,msg="Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=4000;qXfer:memory-map:read-;qXfer:features:read+;qXfer:threads:read+;QStartNoAckMode+;vContSupported+"
This is the gdb-server terminal:
Waiting for gdb server to start...[2024-10-22T04:14:01.763Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
openocd -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s /home/marcus/src/FreeRTOS/app/marvell/WMSDK/mw320/sdk/tools/OpenOCD/interface -s /home/marcus/src/FreeRTOS/app/marvell/WMSDK/mw320/sdk/tools/OpenOCD -f /home/marcus/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl -f /home/marcus/src/FreeRTOS/app/marvell/WMSDK/mw320/sdk/tools/OpenOCD/interface/ftdi.cfg -f /home/marcus/src/FreeRTOS/app/marvell/WMSDK/mw320/sdk/tools/OpenOCD/openocd.cfg -c init -c "load /home/marcus/src/FreeRTOS/build/sesame.axf 0x10013d"
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
CDLiveWatchSetup
jtag
sh_load
Info : clock speed 2000 kHz
Info : JTAG tap: wmcore.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd), part: 0xba00, ver: 0x4)
Info : [wmcore.cpu] Cortex-M4 r0p1 processor detected
Info : [wmcore.cpu] target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for wmcore.cpu on 50000
Info : Listening on port 50000 for gdb connections
Info : JTAG tap: wmcore.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd), part: 0xba00, ver: 0x4)
[wmcore.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00007f14 msp: 0x20001000
DEPRECATED! use 'read_memory' not 'mem2array'
Info : Listening on port 50001 for tcl connections
Info : Listening on port 50002 for telnet connections
Info : accepting 'gdb' connection on tcp/50000
Configuring OS Awareness
Warn : GDB connection 1 on target wmcore.cpu not halted
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Shutting down
shutdown command invoked
Info : dropped 'gdb' connection
[2024-10-22T04:14:07.878Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
Some googling indicates that it could be caused by sending commands to quickly, or something timing-related like that.
OpenOCD is the latest version, and it appears to work when sending the commands manually.
I am debugging a Marvell mw320 target with OpenOCD. The debugger startup fails with:
To Reproduce
Start a debug session with the target connected.
After starting OpenOCD and connecting to the remote debugger, this error is produced on the debug console, and it does not connect to the remote.
Expected behavior
It should connect to remote and allow me to debug the program.
Environment (please complete the following information):
Please include
launch.json
Attach text from
Debug Console
Additional context
When starting OpenOCD and gdb outside of VS.Code on the command line, I am able to connect to the target.