Hello :)
I'm trying to set my own sizes of slots when compiling app with MCU.
Default ones consumes the whole flash:
app:
address: 0x10200
end_address: 0x88000
region: flash_primary
size: 0x77e00
mcuboot:
address: 0x0
end_address: 0x10000
placement:
before:
- mcuboot_primary
region: flash_primary
size: 0x10000
mcuboot_pad:
address: 0x10000
end_address: 0x10200
placement:
align:
start: 0x4000
before:
- mcuboot_primary_app
region: flash_primary
sharers: 0x1
size: 0x200
mcuboot_primary:
address: 0x10000
end_address: 0x88000
orig_span: &id001
- app
- mcuboot_pad
region: flash_primary
size: 0x78000
span: *id001
mcuboot_primary_app:
address: 0x10200
end_address: 0x88000
orig_span: &id002
- app
region: flash_primary
sharers: 0x1
size: 0x77e00
span: *id002
mcuboot_secondary:
address: 0x88000
end_address: 0x100000
orig_span: &id003
- mcuboot_secondary_pad
- mcuboot_secondary_app
region: flash_primary
size: 0x78000
span: *id003
mcuboot_secondary_app:
address: 0x88200
end_address: 0x100000
placement:
after:
- mcuboot_secondary_pad
region: flash_primary
share_size:
- mcuboot_primary_app
size: 0x77e00
mcuboot_secondary_pad:
address: 0x88000
end_address: 0x88200
placement:
after:
- mcuboot_primary
align:
start: 0x4000
region: flash_primary
share_size:
- mcuboot_pad
size: 0x200
otp:
address: 0xff8100
end_address: 0xff83fc
region: otp
size: 0x2fc
pcd_sram:
address: 0x20000000
end_address: 0x20002000
placement:
after:
- start
region: sram_primary
size: 0x2000
rpmsg_nrf53_sram:
address: 0x20070000
end_address: 0x20080000
placement:
before:
- end
region: sram_primary
size: 0x10000
sram_primary:
address: 0x20002000
end_address: 0x20070000
region: sram_primary
size: 0x6e000
What I did, I've added the the pm_static.yml with the sections descriptions I want to have:
mcuboot:
address: 0x0
end_address: 0x10000
region: flash_primary
size: 0x10000
mcuboot_pad:
address: 0x10000
end_address: 0x10200
placement:
before: mcuboot_primary_app
region: flash_primary
size: 0x200
mcuboot_primary:
address: 0x10000
end_address: 0x84000
region: flash_primary
size: 0x74000
mcuboot_primary_app:
address: 0x10200
end_address: 0x84000
region: flash_primary
size: 0x73E00
mcuboot_secondary:
address: 0x84000
end_address: 0xF8000
span: [mcuboot_secondary_pad, mcuboot_secondary_app]
region: flash_primary
size: 0x74000
mcuboot_secondary_app:
address: 0x84200
end_address: 0xF8000
placement:
after: [mcuboot_secondary_pad]
region: flash_primary
size: 0x73E00
mcuboot_secondary_pad:
address: 0x84000
end_address: 0x84200
placement:
after: [mcuboot_primary]
region: flash_primary
size: 0x200
storage:
address: 0xf8000
end_address: 0x100000
region: flash_primary
size: 0x8000Unfortunately I'm getting Partition Manager error:
Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_pad' 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 'mcuboot_secondary_app' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_secondary_pad' is not included in the dynamic resolving since it is statically defined.
Partition manager failed: Incorrect amount of gaps found in static configuration. There must be exactly one gap in the static configuration to support placing the dynamic partitions (such as 'app'). Gaps found (0): The most common solution to this problem is to fill the smallest of these gaps with statically defined partition(s) until there is only one gap left. Alternatively re-order the already defined static partitions so that only one gap remains.
Failed to partition region flash_primary, size of region: 1048576
Partition Configuration:
mcuboot:
size: 65536
mcuboot_pad:
placement:
before: mcuboot_primary_app
size: 512
mcuboot_primary:
size: 475136
mcuboot_primary_app:
size: 474624
mcuboot_secondary:
size: 475136
mcuboot_secondary_app:
placement:
after:
- mcuboot_secondary_pad
size: 474624
mcuboot_secondary_pad:
placement:
after:
- mcuboot_primary
size: 512
storage:
size: 32768