Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to update the application with the debugger instead of using the DFU with a softdevice present?

I have found a lot of people having problems debugging with the SD enabled, but we are not using any BLE atm. We are just using the softdevice for OTA updates. But this is not my issue. I am able to debug the application if it gets started.

The problem is if I use the debugger to upload the updated application the application is never started. The device enters DFU mode instead of booting my application. I assume this is because the bootloader cannot validate the application code.

Right now I have to create a firmware package .zip and upload it via DFU. Which is very time consuming since I have to use BLE DFU.

Is there some flag to circumvent the bootloader checks for debugging?

We are using the secure_bootloader_ble_s140_pca10100 

Thanks for your tips.

Parents
  • Hi,

    The bootlaoder will see that the CRC of the application has changed, and enter DFU mode instead of starting the application. So to fix this you have several options:

    • The "proper", which is to generate a valid DFU settings page as described here, and program that together with the application every time.
    • Or modify the bootloader so that it skips the CRC check. This is more convenient when debugging. To do this you need to modify the bootloader in components\libraries\bootloader\nrf_bootloader.c so that crc_on_valid_app_required() alwas returns false.
    • Or simply test/debug without programming a bootloader.
Reply
  • Hi,

    The bootlaoder will see that the CRC of the application has changed, and enter DFU mode instead of starting the application. So to fix this you have several options:

    • The "proper", which is to generate a valid DFU settings page as described here, and program that together with the application every time.
    • Or modify the bootloader so that it skips the CRC check. This is more convenient when debugging. To do this you need to modify the bootloader in components\libraries\bootloader\nrf_bootloader.c so that crc_on_valid_app_required() alwas returns false.
    • Or simply test/debug without programming a bootloader.
Children
Related