This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52840 - How to debug Zephyr code when the radio is running. HardFault

Hi, I found that after migration from Zigbee Thread SDK to Zephyr GDB debugging functionality is broken.
I have read a lot about PRIMASK register, GDB hooks, and so on, but those didn't fix all of my problems.
I want to use Eclipse + GDB for stepping through the code and dynamic breakpoint placement.
I found a solution, that is somehow satisfying my needs - I mean Monitor mode debugging using Jtrace probe.
```
https://www.segger.com/products/debug-probes/j-link/technology/monitor-mode-debugging/
```
+ custom settings passed to JLINK cmd.

This isn't an ideal solution, as MMD works only in Jlink PRO / Jtrace programmers - so no way to get it working on your dev boards.

Can you provide some universal way to step through the code without HardFaults and resets?

Related