Failed to set MCUboot secondary to external flash. E: Failed to open flash area ID 2 (image 0 slot 1): -2, cannot continue

I have problem placing MCUboot secondary to external flash. I have been testing using nRF9160DK. Project compiles fine but device doesn't boot after flashing the firmware.

Here is the log from serial output of the board. I get error message E: Failed to open flash area ID 2 (image 0 slot 1): -2, cannot continue at the end.

*** Booting nRF Connect SDK v2.8.0-a2386bfc8401 ***
*** Using Zephyr OS v3.7.99-0bc3393fb112 ***
Attempting to boot slot 0.
Attempting to boot from address 0x8200.
I: Verifying signature against key 0.
I: Hash: 0xa5...ef
I: Firmware signature verified.
Firmware version 2
I: Setting monotonic counter (version: 2, slot: 0)

*** Booting MCUboot v2.1.0-dev-4594a8693738 ***
*** Using nRF Connect SDK v2.8.0-a2386bfc8401 ***
*** Using Zephyr OS v3.7.99-0bc3393fb112 ***
I: Starting bootloader
E: Failed to open flash area ID 2 (image 0 slot 1): -2, cannot continue

Here is simple project which I have been trying to use.

app_eft.zip

  • Hello,

    Have you tried flashing any sample from the SDK? If so, does it work fine? From the logs, I see that you’re using nRF Connect SDK v2.8.0, so I assume you’re using sysbuild. If not, I recommend trying it.

    Could you also disable SB_CONFIG_SECURE_BOOT_APPCORE=y in sysbuild.conf and check if you’re able to flash the application?

    Kind regards,
    Abhijith

Related