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

debugging hard faults in NCS

Hi Nordic Community,

I have been experimenting with samples in NCS and making modifications.

Sometimes adding some code causes a hardfault during runtime. I can often find the root cause, e.g de-referencing a struct in memory that doesn't exist.

This often causes z_arm_exc_spurious  . SES (Segger Embedded Studio) doesn't show where the error was first initiated - the only info is that the firmware has reached the z_arm_secure_fault()

Are there any debugging guides (methodical approach) for the Zephyr spurious error?

Are there extra hard fault handlers I can enable to catch things earlier on that show the root cause?

Comparing Nordic NCS/SES to the legacy Nordic SDK and IAR embedded - It seems I'm in much less control of fault handlers and debugging info. 

PS. A separate issue is I can't get thread-level debugging (e.g. threads running, paused, stack usage etc) info from SES. I read somewhere that is coming in v5.40 of SES, is that true?

Parents Reply Children
No Data
Related