I am trying to debug an application in VS Code for the nRF52840 DK in the nRF Connect SDK.
After starting debugging, I immediately get this error: "Exception has occurred. Debugger was unable to continue the process".
This occurs at line 951 of cmsis_gcc.h:
When a breakpoint is placed before __enable_irq(void) is called, the above error occurs at line 73 in reset.S instead:
This is the prj.conf for the non-debug build.
The .conf file for the debug build is the same as above, but with the following additions:
When the application is compiled without the debug options enabled, the build is flashed successfully and behaves as expected.
The Blinky and Central-and-Peripheral-HRS samples can be debugged as normal, so I think there's an issue with my application.
I have tried reinstalling the JLink driver, switching cables, switching ports and switching DK boards but none of these have resolved the issue.
SDK Version: v2.8.0
JLink Version: v7.94i