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

debug bootloader for thread examples

Hi,

I wonder if there exists a debug bootloader for thread examples. There is a bootloader in the secure DFU example, but it is not for debugging. "examples/thread/dfu/bootloader" . I appreciate if you can point me to the right direction.

Best regards,

Ozan

Parents
  • Hello,

    I am sorry. At this point in time there are no Thread Bootloader examples. I don't know whether you want to debug the bootloader or the actual application, but you may be able to disable the CRC check in the bootloader project if you want to debug the application. I have not tried this in the Thread Bootloader, so I wouldn't know exactly how to do it, but please specify what you are looking for, and we can see if we can find a usable approach.

    Best regards,

    Edvin

  • Hi Edvin,

    Thanks for the reply! I want to debug the actual application. I'm adding DFU feature to my application and using the following example as basis

    https://www.nordicsemi.com/DocLib/Content/SDK_Doc/Thread_SDK/v2-0-0/thread_example_dfu

    At that point, I can't debug my app because of the bootloader. As I understand I need to recompile the bootloader in the example above with no-CRC check. Right? Can you tell me how to do that please?

    Best wishes

  • Hello,

    I have not tested,  but yes, that is the correct approach.

    If you don't need to debug anything in the bootloader, you may try to just comment out the two lines in main() of the bootloader's main.c file:

    ret_val = nrf_bootloader_init(dfu_observer);
    APP_ERROR_CHECK(ret_val);

    As I mentioned, I haven't tested it, but it may be a bit more complex than that, but as long as the bootloader is flashed, it should run into nrf_bootloader_app_start() if there is nothing wrong with the app (which is checked inside nrf_bootloader_init().

    Alternatively, if this doesn't work, look at nrf_bootloader_init() in nrf_bootloader.c:

    In the switch (activation result), just make sure that dfu_enter is set to false before if (dfu_enter). If this is false, it will run the application. I believe that this should work.

    Best regards,

    Edvin

Reply
  • Hello,

    I have not tested,  but yes, that is the correct approach.

    If you don't need to debug anything in the bootloader, you may try to just comment out the two lines in main() of the bootloader's main.c file:

    ret_val = nrf_bootloader_init(dfu_observer);
    APP_ERROR_CHECK(ret_val);

    As I mentioned, I haven't tested it, but it may be a bit more complex than that, but as long as the bootloader is flashed, it should run into nrf_bootloader_app_start() if there is nothing wrong with the app (which is checked inside nrf_bootloader_init().

    Alternatively, if this doesn't work, look at nrf_bootloader_init() in nrf_bootloader.c:

    In the switch (activation result), just make sure that dfu_enter is set to false before if (dfu_enter). If this is false, it will run the application. I believe that this should work.

    Best regards,

    Edvin

Children
Related