Shutdown openocd when stopping debug session?
See original GitHub issueI’m not sure if I’m doing something wrong; when I stop the cortex-debug 0.3.7+openocd session, gdb is shutdown, but openocd is left running. Starting a new debug session fails until I manually kill the already running openocd.exe process. I’m using scoop on Windows to install openocd & gcc/gdb:
gcc-arm-none-eabi 10-2020-q4-major [extras]
openocd 0.10.0 [extras]
This happens with request set to “launch” or “attach”
I get a Failed to launch OpenOCD GDB Server: Timeout.
popup, with openocd reporting the following on the Output tab:
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
Error: open failed
in procedure 'init'
in procedure 'ocd_bouncer'
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:10
Top Results From Across the Web
General Commands (OpenOCD User's Guide)
If user types CTRL-C or kills OpenOCD, the command shutdown will be automatically executed to cause OpenOCD to exit. It is possible to...
Read more >Developers - Shutdown openocd when stopping debug session? -
I'm not sure if I'm doing something wrong; when I stop the cortex-debug 0.3.7+openocd session, gdb is shutdown, but openocd is left running....
Read more >Thread: [OpenOCD-user] How to cleanly shut ... - SourceForge
When I close GDB, OpenOCD automatically shuts down. ... in the background, why do you want to stop and restart it every debug...
Read more >GDB Disconnects when trying to debug via openocd
I get this pop up: "OpenOCD GDB Server Quit Unexpectedly. See gdb-server output for more details." And this message in the terminal: Open...
Read more >The SEGGER J-Link debugging plug-in
How to run Eclipse debug sessions using the SEGGER J-Link. ... integration of the GDB server, automatically started/stopped for each debug session ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This should have been fixed a while ago. Please let us know (reopen) if this is still a problem
For openocd, you can use
monitor [target current] configure -event gdb-detach {shutdown}
in your configuration file and this will exit openocd when gdb-detaches. However, it will cause anyone else connected to OpenOCD as well.One workaround I’ve found, type
mon shutdown
at the gdb prompt, while the MCU is paused, then stop the debug session. Klunky, and it doesn’t always work.