I was trying to set up partitions on a nRF5340 DK so I can use MCUBoot, settings, and littlefs but am getting this error when flashing the dk:
E: Failed to open flash area ID 8 (image 0 slot 1): -19, cannot continue
The output Zephyr.dts has this:
flash_controller: flash-controller@39000 { compatible = "nordic,nrf53-flash-controller"; reg = < 0x39000 0x1000 >; partial-erase; #address-cells = < 0x1 >; #size-cells = < 0x1 >; flash0: flash@0 { compatible = "soc-nv-flash"; erase-block-size = < 0x1000 >; write-block-size = < 0x4 >; reg = < 0x0 0x100000 >; partitions { compatible = "fixed-partitions"; #address-cells = < 0x1 >; #size-cells = < 0x1 >; boot_partition: partition@0 { label = "mcuboot"; reg = < 0x0 0x10000 >; }; slot0_partition: partition@10000 { label = "image-0"; reg = < 0x10000 0x40000 >; }; slot0_ns_partition: partition@50000 { label = "image-0-nonsecure"; reg = < 0x50000 0x30000 >; }; slot1_partition: partition@80000 { label = "image-1"; reg = < 0x80000 0x40000 >; }; slot1_ns_partition: partition@c0000 { label = "image-1-nonsecure"; reg = < 0xc0000 0x30000 >; }; }; }; };
The overlay has:
/ { fstab { compatible = "zephyr,fstab"; lfs: lfs { compatible = "zephyr,fstab,littlefs"; mount-point = "/lfs"; partition = <&littlefs_storage>; automount; read-size = <16>; prog-size = <16>; cache-size = <64>; lookahead-size = <32>; block-cycles = <512>; }; }; }; /delete-node/ &storage_partition; &mx25r64 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; littlefs_storage: partition@0 { label = "littlefs_storage"; reg = <0x00000000 0x00200000>; }; lvgl_raw_partition: partition@200000 { label = "lvgl_raw_partition"; reg = <0x00200000 0x00200000>; }; settings_partition: partition@400000 { label = "settings_partition"; reg = <0x400000 0x100000 >; }; }; };
My prj.conf has this in it:
# Enable Flash CONFIG_FLASH=y CONFIG_FLASH_MAP=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n CONFIG_NORDIC_QSPI_NOR=y # file system CONFIG_FILE_SYSTEM=y CONFIG_FILE_SYSTEM_LITTLEFS=y
Here is the memory report: