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

DFU Upgrade of only Bootloader (not SoftDevice)

I am in the situation that I have 1000+ deployed devices with a buggy bootloader in a production environment. The current application version triggers this bug, which means that as soon as the bootloader is entered it crashes and the application is started again. So I can not upgrade the application any more. I need to upgrade the bootloader first.

The problem is that the devices have a nRF52810 which does not have enough flash space to allow for SD+BL updates.

Is there any way I can do a BL update only (without the softdevice)? I know nrfutil does not support this right now, but what are the chances that I could change/hack nrfutil or the DFU package ZIP file to add the BL without the SD?

Why does this restriction exist at all, why doesn't nrfutil allow us to make BL+APP or BL only upgrade packages?

Parents
  • Hi,

    I have a few questions in order to understand more:

    • What bootloader have you flashed on the device and what changes have you made?
    • Which transport do you use (BLE or UART)?
    • What does your flash layout look like?

    Generally, there is no problem upgrading just the bootloader without upbraiding the SoftDevice, as long as the new bootloader is built for the same SoftDevice. However, in order to support bootloader updates you must have enough free space in the application are to temporarily store the bootloader, and you must have a MBR params page. If either of these two are missing, bootloader update is not possible. 

    nrfutil does allow generating a upgrade image of the bootloader only, and that is also supported by the nrF5 SDK bootloader. The only combination that is not allowed is bootloader + application, so in this case you need to use two separate upgrade images and to one after the other.

  • Thank you for your answer!

    I use an adapted version of the secure bootloader from the SDK, but I have introduced a bug when WDT is activated by the application. The current application uses WDT so the bootloader crashes every time I enter it. So there is no way to update neither APP or BL. I think this case is hopeless...

    I use the BLE transport. The flash layout is single bank and there is not enough space on nRF52810 to update the BL+SD...

    I wonder why the bootloader + application combination is not allowed, as that would help in this case, when I upgrade older versions. As you said I have to update BL first and then the application, but it would be good to be able to do that in a single command as with APP+SD+BL upgrades.

  • Yes, unfortunately...

    Another issue is the upgrade of APP+BL: That would be really useful to upgrade older versions. It should work the same way as APP+SD+BL updates, just without SD. The BL is updated first and then the application in one go. If we have to update BL first and then reconnect to MAC address + 1 to separately upgrade the APP that gets unmanageable really quickly if you have many devices in an environment.

  • I see. APP+BL is not supported though, and not possible. If you are making a app for your end customers to use in the field you could integrate this so that the operation looks like a single operation from the GUI user perspective, though.

  • Why is this not supported? As far as I can see it is exactly the same as a BL+SD update followed by a APP update, only without the SD.

  • I am not sure why that decision was made, but most likely it was because it did not seem like a important feature, and keeping the BL as small as possible is a priority. Note that actually, BL+SD+APP is also not supported by the bootloader directly, but by the surrounding tools. Upgrade is in fact split in two there as well, even though it is in a single .zip package.

  • Exactly, it wouldn't affect the bootloader at all, just the surrounding tools. As devices with smaller flash like the 52810 are available, where SD upgrades are not feasible, I think this feature gets more important.

Reply Children
No Data
Related