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

App upgrade between nrf SDK 1.1.0 and 1.2.0 not working

Hi,

I was using SDK v1.1.0 for a while and am updating my project to SDK v1.2.0. I see that there is also a release for v1.3.0, however, there are too many application and build changes for me to integrate that into our project at the moment.

So previously all my applications were built with v1.1.0. I am trying to update devices using the application DFU tools to my new application built with SDK v1.2.0. I am running into issues, however. The application upgrade does what it is normally supposed to do and when it is finished, it successfully calls   boot_write_img_confirmed();  to mark the upgrade as succeeded. However, on the next power on, the application reverts back to the previous version.   This only happens when I try and upgrade a  v1.1.0 application to a v1.2.0 application.

Is there a breaking change in the application upgrade between the 2 SDK versions?  Is there a way to solve this without re-flashing the entire image (including the bootloader)?

Also, will this happen between v1.2.0 and v1.3.0?

Thanks,

Jack

Parents
  • Hi.

    Are you using a static partition map?

    When you are building a multi-image project (such as application+SPM+MCUBoot), a script called the Partition Manager will automatically partition up the flash for the different images. I.e. the location of the application image in flash is dynamically decided during build-time. Therefore, if your project changes enough to cause the partition manager to create a new partition scheme (which is quite likely when upgrading the SDK version), the application will write that the image is OK to a different place than where MCUBoot will check if the application is OK.

    The way around this problem is to provide the partition manager with a static configuration file. The easiest way to do that is to build your original project (the one that is programmed on the device), then extract the partitions.yml file from the build directory. Then, you copy the partitions.yml file and place it next to the CMakeLists.txt file in your new project, and rename partitions.yml to pm_static.yml.

    You can find the documentation on the partition manager and static configurations here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html#static-configuration

    Best regards,

    Didrik

Reply
  • Hi.

    Are you using a static partition map?

    When you are building a multi-image project (such as application+SPM+MCUBoot), a script called the Partition Manager will automatically partition up the flash for the different images. I.e. the location of the application image in flash is dynamically decided during build-time. Therefore, if your project changes enough to cause the partition manager to create a new partition scheme (which is quite likely when upgrading the SDK version), the application will write that the image is OK to a different place than where MCUBoot will check if the application is OK.

    The way around this problem is to provide the partition manager with a static configuration file. The easiest way to do that is to build your original project (the one that is programmed on the device), then extract the partitions.yml file from the build directory. Then, you copy the partitions.yml file and place it next to the CMakeLists.txt file in your new project, and rename partitions.yml to pm_static.yml.

    You can find the documentation on the partition manager and static configurations here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html#static-configuration

    Best regards,

    Didrik

Children
Related