Issues with nRF Debugging Backend in Zephyr/VSCode

While creating a fairly simple C++ project using nRFConnect v2.4.0 (2 threads and a couple blinking LEDs) in VSCode, I started getting issues during debugging. While it was initially working, at some point I started to hit a Fatal Error before reaching main (reason 35, see call stack below).

Interestingly, debugging works fine with Ozone. It also works in VSCode if I change the nRFConnect Extension Debugging Backend to Cortex-Debug. Is this a known issue?

Parents
  • Hi John,

    It would be great if you could provide some more information about the type of the device, the board type and also the application type. But before that, first please verify the following:

    • Does the board the app is built for match the device?
    • Erase the device flash before starting debugging.
    • Try configuring debugging (click the cogwheel next to the debug button), and add flash: false, then perform flashing manually.
    • Some samples have very tight stack sizes that breaks when enabling debug options. Could this be the case?
    • If you are running with the Softdevice controller for Bluetooth support, hitting breakpoints may crash the firmware.
    • Samples will set CONFIG_RESET_ON_FATAL_ERROR by default, which could make it look like the device is running fine, but it's actually stuck in a reset loop. Maybe this could be the case?

    Best Regards,

    Priyanka

  • It looks like erasing and flashing to the board outside of the "Debug" action worked. That's interesting that the Erase step in the Debug action behaved differently.

Reply Children
Related