How does a JTAG/SWD debugger know when BKPT is executed?
My guess is that BKPT triggers entry to debug monitor and entering debug monitor sets something in the debug port, but what, and how does a debugger know about it?
The S_HALT bit of DHCSR will become set (indicating that the core has entered the 'debug halt' state) and the BKPT bit of DFSR will be set (indicating that a breakpoint event has occurred - this could either be a software or hardware breakpoint - check the value of PC to see where execution was stopped).
breakpoint event ha occurred - this could either be a software or hardware - check the value of PC to see where
9Appss
ShowBox
Tutuapp