This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Debug Thread Examples with nRF52840 Dongle

Hello,

I'm using CLI USB examble from Thread and Zigbee SDK by Nordic. I am using nRF52840 Dongle along with a J-link EDU mini.

My problem is that, when I start debugging by clicking the "Play" icon, the debugger does not stop at the first instruction in main. It goes somewhere in the disassembly.

The only way I found to debug Step-by-Step is to do a Full Erase of the Dongle before debugging. Unfortunately this cannot be a solution to my problem since the operation also erases the bootloader section in the Flash.

Can you help me solve this problem?

Thanks!

  • I successfully flashed the new bootloader using J-link. Still, once I have flashed my app and the softdevice, the program remains stuck in the bootloader.

    One question is: what is the cottect bootloader to use when using SDK for Thread? And what is the bootloader-version to use when creating the bootloader settings with nrfutil?

    Also, I read something about setting BANK_VALID_APP = 0x01 in the bootloader using a specific hex file but the one I found changes flash line 0x3FC00 which is not part of the bootloader..

  • Hi, you need to generate and flash the bootloader settings page to inform the bootloader that a valid application exists. The setting of the BANK_VALID_APP flag approach was used with the old legacy bootloader (before SDK v12 and Thread SDK). 

    kalpino said:
    One question is: what is the cottect bootloader to use when using SDK for Thread?

     All variants are based on the same bootloader, but may have different transport layers and configuration settings. E.g., the bootloader that support DFU over thread is configured to allow DFU handling in the application. Follow the Thread Secure DFU protocol documentation if you want DFU over Thread, else you can take a look at the other DFU bootloader examples.

  • SOLVED: My problem was in the flash_management file of the project. The flash region dedicated to openthread was wrong. I found it was different from one of the example projects of the SDK.

Related