After upgrading mcuboot, the device crashes upon power-up

hi,

  After upgrading mcuboot from NCS 2.6.1 to NCS 2.9.0, the upgrade file is downloaded, and the device restarts and runs normally. The mcuboot version number and active slot are updated as expected. However, when the device is powered off and then powered on again, it fails to work properly, almost as if it has crashed. What could be the cause of this issue?

In NCS 2.6.1, the default value of CONFIG_PM_PARTITION_SIZE_MCUBOOT is 0xc000, while in NCS 2.9.0, the default value is 0xbe00. A bug related to the MCUboot partition size was fixed on October 24, 2024. Could this bug have affected the upgrade failure?

Link:Fix MCUboot partition sizes

  • Hi,

    Looking at the examples you sent, pm_static.yml is mostly commented out.

    Yes, I only defined the location of the mcuboot secondary partition, the others are generated at build time, and I've compared the partitions of the two examples using memory report, and they are exactly the same.

    A pm_static.yml that defined all DFU partitions is required. Try to use the same pm_static.yml for both projects. Does DFU work then?

    I tried to use the exact same pm_static.yml in both examples, which defines all partitions, but still the upgrade fails with the same occurrences.

    On this basis, I tried to keep the B0 configuration of the NCS 2.9.0 example consistent with the B0 configuration of the NCS 2.6.1 example, mainly by setting the following KCONFIG. Then flash the NCS2.9.0 example directly, and the result is the same, it seems to be unable to start MCUBoot after running B0.

    CONFIG_BL_ROT_VERIFY_EXT_API_ENABLED=n
    CONFIG_BL_SHA256_EXT_API_ENABLED=n
    CONFIG_BL_SECP256R1_EXT_API_ENABLED=n
    CONFIG_BL_VALIDATE_FW_EXT_API_ENABLED=n
    CONFIG_EXT_API_PROVIDE_EXT_API_ENABLED=n

Related