nRF Connect SDK Intermediate Lesson 1 Exercise 1 Debugging Issues

Hi

This is my first time using nRF connect and Visual studio but I have been following through first the Fundamentals course on the Dev Academy using the nRF52840 DK with no issues.

However in exercise 1 of lesson 1 of the Intermediate course, when attempting to debug i do not end up in "main" function but in the file ".../zephyr/arch/arm/core/cortex_m/reset.S". I also do not have any of the functions showing in the call stack or any threads in the thread view of the NRF Debug terminal.

The code appears to run correctly if i stop debugging and i get the LEDs toggling and the terminal outputs as expected and i get the same behavior using the solution code so i assume it is something to do with my setup rather than the code itself.

I am connected to the nRF52840 DK directly via USB.

I would be grateful for an suggestions on how to go about resolving this.

Parents
  • Hello,

    Does it start in reset.S? Have you tried setting a breakpoint somewhere near the start of your main() function, and then hit the "play" button near the top of the VS Code window?

    Does it jump into main() then?

    Best regards,

    Edvin

  • Hi Edvin,

    Thanks for getting back to me.

    Yes it starts in reset.S, if i set a break point in main() and then continue it stops at the break point in main() but I don't get anything in the Thread Viewer and the call stack only contains main().  If i add a break point at the end of main() and continue to it then the tread viewer is populated but greyed out (cannot interact with anything unlike the description in exercise 1) and the call stack still only contains main(). Is this how it is supposed to function?

    Best regards,

    Tom

Reply
  • Hi Edvin,

    Thanks for getting back to me.

    Yes it starts in reset.S, if i set a break point in main() and then continue it stops at the break point in main() but I don't get anything in the Thread Viewer and the call stack only contains main().  If i add a break point at the end of main() and continue to it then the tread viewer is populated but greyed out (cannot interact with anything unlike the description in exercise 1) and the call stack still only contains main(). Is this how it is supposed to function?

    Best regards,

    Tom

Children
Related