nRF Connect blinky sample hard to debug

My setup:

Mac OS 11.5.2

Vs Code 1.60.2

nRF Connect SDK 1.7.0

nRF52840DK

Using the tutorial videos provided I went through the process of creating the basic blinky sample. I can build, erase and flash and the code appears to work.

When I click on the Debug button bottom left from the nRF Connect pane, the debugger stops in a file called fatal.c sometimes, and at other times stops in reset.S or cpu_idle.S. 

However, if I then click the stop button (small red square in debugger controller), and then the Run and Debug button that appears afterwards, it sometimes works just fine and I can step through the source code.

If I try the samples/bluetooth/peripheral_lbs application, it debugs directly from the nRF Connect pane without difficulty and breaks at the beginning of the main function.

Parents Reply
  • Speaking of that, yes I had "enable debugging" checked when I created the project.

    I could not find any documentation on what that actually does. Is there something that describes what the results of that checkbox is?

    The video tutorial said that if I did not check that, I can add some rather specific debug options to the prj.conf file to get debugging to work. I expected to see those as a result of checking the box, but that wasn't the case.

Children
Related