Connect to target without reset to debug already-running FW
Is it possible to connect the ST-Link SWD debugger to an already-running target to debug FW without resetting the target?
I found a similar question on electronics.stackexchange but there weren’t any definite answers.
Things I’ve tried:
- Different Eclipse debug configurations on the Startup tab. All options I’ve tried will connect but result in a target reset.
- IAR’s ‘Attach To Running Target’ but it always resets the target. IAR said that other JTAG interfaces (I-Jet debugger) will do this.
- The OpenOCD that comes with OpenStm32 but it also seems to reset the target. OpenOCD connects and I can issue commands to read memory via the telnet port but OpenOCD always resets the target. It’s possible that a .cfg file might need to be configured to NOT reset - I just haven’t figured out which .cfg to change and how to change it.
- I tried the texane/stlink on GitHub on Windows and when it connects, it’ll reset unlesss I use the --no-reset option. This implies that the ST-Link/SWD hardware interface can connect without a reset.
- I can use the ST-LINK_CLI.exe command line utility to connect to a running target and read RAM without a reset. I need the HOTPLUG parameter. For example, to read a 32-bit value at a particular address, I can use ST-LINK_CLI -c HOTPLUG -r32 0x20000450 1. This can repeatedly read the value without a reset which indicates that the ST-Link/SWD hardware interface can connect without a reset.
Why I want to do this:
- I’m attempting to debug a condition that appears somewhat randomly on roughly 6 targets running in a lab environment. When the error condition occurs on one of the targets, I’d like to attach the debugger and inspect about 6 variables. Full debug capabilities would allow much quicker resolution of the problem. A reset causes the error condition to be erased.
- It would be nice to implement a GUI, similar to STM-Studio, T.I.’s GUI Composer or IAR’s live-watch window used to talk via SWD/JTAG to display data as mentioned here
and here
.