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

Bootloader-Only update over BLE DFU

I am running SDK 14.2.0 and trying to update only the bootloader.  Very minor changes were made, resulting in no size increase.

I ran nrfutil (V3.4.0) using the following command:

nrfutil pkg generate --hw-version 52 --bootloader-version 3 --bootloader Bootloader.hex --sd-req 0x9d --key-file Signing\private.key Bootloader-Pack
age.zip

When I try to update, I get a quick error just after the dfu starts:

DFU failed with error: When writing 'EXECUTE' command to Control Point Characteristic of DFU Target: Operation code 4 (EXECUTE) failed on DFU Target.  Result code 4 (INSUFFICIENT_RESOURCES).

I think this means there is not enough room to perform the update, but the bootloader is within the range allocated and merges/works fine when loaded directly using a j-link.

Any ideas?

  • Hello,

     

    When you are updating using j-link, you are reprogramming the device using the programming chip. When you use the bootloader to update any firmware, the chip must do this itself. Therefore, it will not delete the old bootloader before the new one is verified. Hence, you need to have space for 2x bootloader for the chip to accept it. The reason for this is that the bootloader is needed to transfer the packet. 

    Are you sure there is enough room in the ram/flash to store the new bootloader?

     

    Best regards,

    Edvin

  • I am using a nRF52832 with 512KB flash.  My application is 186K and I am using the S132 V5.0 softdevice.  There should be plenty of space leftover.  Are there any other requirements on this space?

  • Also, how does the bootloader determine the space that is has to work with?

  • Hello,

    I am not quite sure about this one. I thought the bootloader would delete the application if it was not space for dual banking.

    What SDK is your original bootloader based on?

    Is it possible to reproduce this on an nRF52DK? Is it possible to send the original bootloader project, and also the application that is on the chip? At least the .hex file, so that I can try to reproduce it?

     

    I also found another case with someone else facing the same issue. Do you use the debug bootloader project? Do you have dual banking enabled (in sdk_config.h on the bootloader project)? 

     

    Best regards,

    Edvin

Related