pyOCD icon indicating copy to clipboard operation
pyOCD copied to clipboard

Proper detach after exiting commander

Open hagibr opened this issue 5 months ago • 0 comments

Hello I've noted that when I connect to my target via commander, when I exit it doesn't execute proper detach procedure, but if I connect via gdbserver, it does. My application can monitor if a debugger is attached by reading DCB->DHCSR.DEBUGEN bit. So if I execute:

pyocd commander -t <my_target>
pyocd> exit

The value of DCB->DHCSR.DEBUGEN is always 1

But if I execute:

pyocd gdbserver -t <my_target> -M attach
<Ctrl+C>

The value of DCB->DHCSR.DEBUGEN go to 1 while gdbserver is running, but go to 0 when I quit gdbserver.

hagibr avatar Aug 29 '25 11:08 hagibr