Cannot debug BLE Fundamentals examples with VS Code and nRF54L15DK

Hi,

I am currently evaluating the new nRF54L15 DK development kit.

I installed VS Code v1.96.4 with nRF Connect for VS Code Extension Pack v2024.9.5. I am currently using SDK and toolchain v2.8.0 for my tests.

I was able to correctly download, compile and debug few example applications from the SDK like the 'blinky' app and the 'peripheral_lbs'.

Then I tried to do the same with examples provided in the BLE Fundamentals software pack (i.e bt-fund-main\v2.8.x-v2.7.0\l2\l2_e1_sol)

With 'l2_e1_sol' example app I am able to correctly compile and flash to the board (the code is executed like a charm); but when I try to start a debug session, an exception immediately occurs in Zephyr kernel and the debugger never jump into the main.

Is there any extra config to set to correctly debug the BLE Fundamentals example apps on nRF54L15 DK ?

Parents
  • Hi,

    A limitation when debugging BLE applications is that the Bluetooth stack may assert if you resume execution after halting the CPU (e.g., resuming execution after hitting a breakpoint). This happens because halting the CPU disrupts the real time requirements of the stack. However, this should not be an issue until BLE is enabled. Please make sure CONFIG_LOG=y is enabled in your project configuration (prj.conf) and check the debug log for runtime errors.

    Best regards,

    Vidar 

  • Hi Vidar,

    Thanks for the hints. CONFIG_LOG=y is enabled by default in the 'l2_e1_sol' example. Indeed, when I look into the log (refer to the print screen below) I realize that the debugger is executing the entire code. I don't know why it doesn't halt at the start of the main function or any breakpoints I place inside while it works with the 'blinky' app.

    This is quite strange since the same code can be correctly debugged on a nRF52840DK board.

    Gregory

  • Hello,

    Can you try to switch to v2.9.0 and see if it has improved?

    In VS code you need to install both the nRF Connect SDK v2.9.0 and the toolchain for v2.9.0.

    In addition I do believe you need to install both the nRF Command line tools and add nrfutil to system path. Also update it by running "nrfutil -self-upgrade" and "nrfutil install device" and "nrfutil upgrade device". Finally run for instance "nrfutil device recover --traits devkit" to check that it works.

    I can't see any specific reason why you should have problem with Bluetooth projects, other than you can't single step with Bluetooth projects, since this will break the real-time handling. So you can only set a breakpoint, and then restart to run one more time.

    Kenneth

  • his will break the real-time han

    Hello,

    To tell the truth, I started to experiment the BLE Fundamentals examples with SDK and toolchain v2.9.0.and I faced the same debugging issue. I decided to go back to v2.8.0 since BLE Fundamentals examples are specified to be compliant with SDK up to v2.8.x (even if I guess v2.9.x should not be a problem).

    Anyway, I installed the latest SDK/toolchain v2.9.0 again on my VS code environment and I updated the nrfutil according to your last post.

    Here the status about nrfutil


    C:\ncs\tools>nrfutil list
    Command Version Description
    completion 1.5.0
    device 2.7.12 Manage and program devices
    nrf5sdk-tools 1.1.0 nRF5 SDK tools that were available in nRF Util 6
    dfu
    keys
    pkg
    settings
    zigbee

    C:\ncs\tools>nrfutil device recover --traits devkit
    v Recovered 1057797634



    Unfortunately, these updates don't change the behavior :the debugger doesn't stop at the main entry point or any breakpoint I manually place.

  • Do you use Optimize for debugging?

    If still no luck, maybe give Ozone a try?
    https://www.segger.com/products/development-tools/ozone-j-link-debugger/ 

    Then you can click on Debug with Ozone from the ACTIONS window instead.

    Kenneth

  • Hello,

    Yes, I confirm that I use the -Og option.

    Can I kindly ask you if you did a try on your side to debug this example on your VS code environment with the nRF54L15 DK board ? Does it work ?
    I just would like to understand if the issue is an isolated problem on my side, due to a bad environment setup, or if the VS code extension is temporarily unsuitable for this new nRF54L family ?


  • Hello, 

    I am having a similar issue to Gregory, my nRF54L15 is failing to debug when Bluetooth is enabled (CONFIG_BT=y). 

    Here is the fault:

    The faulting instruction varies but it is usually somewhere in this file: ncs/v2.9.1/zephyr/subsys/bluetooth/host/data.c

    When I flash it normally everything works as expected, it's only during debugging that this fault occurs.

    Are there any known solutions for this?

    Thank you,

    Riley

Reply
  • Hello, 

    I am having a similar issue to Gregory, my nRF54L15 is failing to debug when Bluetooth is enabled (CONFIG_BT=y). 

    Here is the fault:

    The faulting instruction varies but it is usually somewhere in this file: ncs/v2.9.1/zephyr/subsys/bluetooth/host/data.c

    When I flash it normally everything works as expected, it's only during debugging that this fault occurs.

    Are there any known solutions for this?

    Thank you,

    Riley

Children
No Data
Related