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

Insufficient resources on DFU OTA

Hej,

on trying to update firmware on nrf52832 over the air I'm getting the error message INSUFFICIENT_RESOURCES.

Actually I don't understand the error message because if I generate the bootloader settings page for the firmware image and flash both hex files separately (the firmware and the bl settings page) everything works as expected. For our customers I wan't this firmware image to be updated using DFU OTA so I generate a zip file with nrfutil:

nrfutil pkg generate --hw-version 52 --application-version 1 --application myfirmware.hex --sd-req 0x8c --key-file ../keys/private.pem update_file.zip

I need to say that since our last update we added a ton of features and a huge binary blob of about 60 kB so that the resulting image has a size of 348 kB. Regarding the nrf52 memory layout the firmware image starts at 0x1f000. The bootloader starts at address 0x78000. So from my understanding the firmware exactly fits into the space between 0x1f000 and 0x78000. Correct me if I'm wrong. Do I miss something? Are there any restrictions regarding file size and DFU OTA update?

Best regards

Christian Haake

  • Hi,

    Yes, that is the line to change. If you do not use application data at all (and do not use any libraries such as peer manager that does) then setting it to 0 is safe.

    It is a compile time bootloader setting, and it cannot be overridden. (Fortunately, some would say, as changing it during DFU would allow for erasing application data.) So no, it cannot be circumvented and you need a bootloader that is built with the correct setting. Of course, you can do a bootloader upgrade first, to a bootloader with the new setting, then do the application update.

    Regards,
    Terje

  • Yes, of course we can. On the other hand we want our customers to do as less updates as necessary. But now for a firmware update we need our central device to be able to retrieve the bootloader version in order to update the bootloader followed by the large(r) firmware image once the bootloader is up to date Unamused

  • What if you first try an application update. If it fails, in this particular way, you do a bootloader update before retrying?

  • Hi Terje,

    I am having this same issue.  I compiled my code with GCC and -Og and -g3 set, so the code is quite big (709kB).  However, it flashes with the bootloader and softdevice without any problems using nRFgo Studio and nrfjprog.  It is only when I try to do a DFU that it fails with the "INSUFFICIENT RESOURCES" error.  Why would this happen?

    EDIT: Nevermind.  I found this thread that pointed out not to merge the settings hex with the application hex when creating a DFU package and only to do it when flashing the original application file.  I generated a new package without merging with the settings hex and the error went away.

Related