Static partitioning littleFS+MCUboot+settings

Hi,

I am using custom nrf52840 board with sysbuild, MCUboot+firmware loader, static partitioning, settings storage (OpenThread) and littleFS storage and I cannot get the thing to build.

This is my pm_static.ym file:

mcuboot:
  address: 0x0
  size: 0x6000
  region: flash_primary

mcuboot_pad1:
  address: 0x6000
  size: 0x200
  region: flash_primary
mcuboot_pad2:
  address: 0xA2000
  size: 0x200
  region: flash_primary

app:
  address: 0x6200
  size: 0x95E00
  region: flash_primary

firmware_loader:
  address: 0xA2200
  size: 0x5BE00
  region: flash_primary

settings_storage:
  address: 0xFE000
  size: 0x2000
  region: flash_primary

mcuboot_primary:
  address: 0x6000
  size: 0x96000
  span: [mcuboot_pad1, app]
  region: flash_primary

mcuboot_primary_app:
  address: 0x6200
  size: 0x95E00
  span: [app]
  region: flash_primary

mcuboot_secondary:
  address: 0xA2000
  size: 0x5C000
  span: [mcuboot_pad2, firmware_loader]
  region: flash_primary

mcuboot_secondary_app:
  address: 0xA2200
  size: 0x5BE00
  span: [firmware_loader]
  region: flash_primary

littlefs_storage:
  address: 0x9C000
  size: 0x6000
  region: flash_primary

sram_primary:
  address: 0x20000000
  size: 0x40000
  region: sram_primary



Here is the relevant part of DTS:

/ {
    chosen {
        zephyr,flash = &flash0;
        zephyr,settings-partition = &storage_partition;
    };

    fstab: fstab {
        compatible = "zephyr,fstab";
        lfs: lfs {
            compatible = "zephyr,fstab,littlefs";
            mount-point = "/lfs1";
            partition = <&littlefs_partition>;
            automount;
            read-size = <16>;
            prog-size = <16>;
            cache-size = <64>;
            lookahead-size = <32>;
            block-cycles = <512>;
            read-only;
        };
    };
};
&flash0 {
    partitions {
        compatible = "fixed-partitions";
        #address-cells = <1>;
        #size-cells = <1>;

        boot_partition: partition@0 {
            label = "mcuboot";
            reg = <0x00000000 DT_SIZE_K(24)>;
        };

        slot0_partition: partition@6000 {
            label = "image-0";
            reg = <0x00006000 DT_SIZE_K(600)>;
        };

        littlefs_partition: partition@9c000 {
            label = "littlefs";
            reg = <0x0009c000 DT_SIZE_K(24)>;
        };

        slot1_partition: partition@A2000 {
            label = "image-1";
            reg = <0x000A2000 DT_SIZE_K(368)>;
        };

        storage_partition: partition@fe000 {
            label = "storage";
            reg = <0x000fe000 DT_SIZE_K(8)>;
        };
    };
};

And here is the error that is generated:
Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
Partition 'settings_storage' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.
Partition 'littlefs_storage' is not included in the dynamic resolving since it is statically defined.
Partition manager failed: End of last partition is after last valid address
Failed to partition region flash_primary, size of region: 1048576
Partition Configuration:
app:
size: 613888
firmware_loader:
size: 376320
littlefs_storage:
size: 24576
mcuboot:
size: 24576
mcuboot_pad:
placement:
align:
start: 4096
size: 512
mcuboot_pad1:
size: 512
mcuboot_pad2:
size: 512
mcuboot_primary:
size: 614400
mcuboot_primary_app:
size: 613888
mcuboot_secondary:
size: 376832
mcuboot_secondary_app:
size: 376320
settings_storage:
size: 8192


Please I need help. This is too much.

Related