What is the key advantage or any application notes on usage of Debug Unit. As I understand it specifies about how external debugger can interface it, but how it could be used by Software (Crash dump SW) within (embedded system) to control and debug issues without external debugger.
1. Can the Watchpoint and Breakpoint shall be set dynamically ?
2. When break point hits, can we re-route it to some Exception handler ?
1) Yes, breakpoint and watchpoints can be configured/re-configured dynamically at run-time. Either by software running on the target itself, or via an external debugger such as DS-5.
2) The debug logic can be put into either Halt Mode or Monitor Mode. Halt Mode is used when you have an external debugger attached. On hitting a breakpoint, execution will stop and the core will enter debug state. This allows the external debugger to take control of the core. In Monitor, an exception is generated, which can be handler by software running on the core. This software is usually called a Debug Agent, GDB server is an example of this.
Note, most external baremetal debuggers (again, e.g. DS-5) will automatically enable halt mode when they connect to a target.
Thanks for the response. Is it any source code (in any RTOS like CMSIS or linux kernel) where we can examine gdb server codes. Especially any reference to ARM Linaro Toolchain sources.
Not sure, I've personally never used GDB on R class. You could try here: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm
View all questions in Cortex-R / R-Profile forum