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

Big primary image prevents FOTA

Hey there,

while developing a rather huge application (~97% FLASH used) for the nRF9160, we encountered the problem, that when triggering a FOTA via lwm2m, it fails.

The updatefile is downloaded correctly, but it's the update process which fails when executing after reboot with a  W: Not enough free space to run swap upgrade error.

The issue seems to be, that there is no completely free sector to swap (We are using the default CONFIG_BOOT_SWAP_USING_MOVE.updatescheme). So far this is the expected behaviour, but is it possible to recognise this state at compile time and throw an warning or even abort compiling when having FOTA activated?

This issue can be quite harmful to devices used in the field.

Thanks for your help :)

using:
nRF9160
ncs v.1.5.1
zephyr v.2.4.99

  • Hi,

    we are facing the same issue.

  • Ditto. The combination of this issue with the mcumgr issue listed above is definitely causing us some issues.

  • Hey Stephan,

    We ran into the same problem as you did and to prevent it from happening we would like to implement your work around but this seems to cause the partition manager to signify data overlapping issues and/or shrink the bootloaders accecable partition.

    Could you share some of your configs so we might be able to better define ours

    Thanks in advance!

    regards,

    S Biezeman

  • Hi,

    simply add a partition to pm_static.yml at the end of the flash address space:

    The partition manager will automatically resize the "app" partition to the available space.

    We ended up reserving 2 flash sectors, to account for the image trailer but I don't remember the details.

1 2