Bluetooth Low Energy Fundamentals, Lesson 4 Exercise 2, fatal error when debugging.

Hello,

I'm creating a simple test project based on the l4_e2 example, but I'm having trouble debugging it. The program encounters a fatal error before the main() function and goes to an infinite loop. Steps to reproduce the error:

  • Download github.com/.../bt-fund repo
  • copy `\v2.9.0-v2.7.0\l4\l4_e2_sol` directory to my projects folder
  • Open an existing application > `l4_e2_sol`
  • Add build configuration
    • Board target: `nrf54l15dk/nrf54l15/cpuapp`
    • Optimization level: `Optimize for debugging (-Og)`
    • Build Configuration
  • nRF Connect > ACTIONS > Debug

The program uploads, the debugging starts and shows the program as running. Device is not visible in the nRF Connect app. Pausing the debugging shows that we're in an infinite loop in the `arch_system_halt` function, `reason = 19`. When uploading using the Flash action the program runs normally. Also sometimes after restarting the debugging the program will also run, but not always. I'm not sure how to debug this further since the program never even gets to main(). Any help would be appreciated.

Best regards
Sašo

Related