MCUboot reports “Image in the primary slot is not valid!” when flashing nRF54L05-compiled image onto nRF54L15 DK (NCS v3.1.0)

Hi,

I am working with NRF54L05 SoC using NRF Connect SDK V3.1.0 and NRF54L15DK for testing.

I am seeing an inconsistent MCUboot validation failure when flashing a firmware build that includes MCUboot. The first time I flash the MCUboot-enabled image, MCUboot prints:

*** Booting MCUboot v2.1.0-dev-2b69d93e75bc ***
*** Using nRF Connect SDK v3.1.0-6c6e5b32496e ***
*** Using Zephyr OS v4.1.99-1612683d4010 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
E: Image in the primary slot is not valid!

If I then flash an image built without MCUboot, and after that flash the same MCUboot-enabled image again, the MCUboot-enabled image boots/works as expected.

*** Booting MCUboot v2.1.0-dev-2b69d93e75bc ***
*** Using nRF Connect SDK v3.1.0-6c6e5b32496e ***
*** Using Zephyr OS v4.1.99-1612683d4010 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
E: Image in the primary slot is not valid!

This looks like the first MCUboot-enabled flash is not leaving a valid image in the primary slot (or MCUboot is reading the wrong place), but something about flashing the non-MCUboot image changes flash contents/state so that the MCUboot-enabled image becomes valid on the next flash.

I found the same issue multiple times. Please advise what could cause MCUboot to report the primary slot image as invalid in this setup (nRF54L05 build flashed on nRF54L15 DK) and what checks or configuration details you need to diagnose it.

Parents Reply Children
No Data
Related