Hi,
I am using the nrf54l15 on a custom board in our current project and want to use it with DFU over BLE FOTA as well as TF-M.
I can compile the project just fine before adding DFU as described in your tutorial (tutorial) The only diffrence being that i started from the Blinky Example.
When i try to compile the project it gives me an alignment error:
!!!Partition alignment error!!! The non-secure start address in pm_static.yml or generated partition.yml is: 0x64600 which is not aligned with the SPU/MPC HW requirements. In nRF53/nRF91 series the flash region need to be aligned with the SPU region size. In nRF54L15 the flash region need to be aligned with the MPC region size. Refer to the documentation section 'TF-M partition alignment requirements' for more information.
Here is my compiled partitons.yml (when i delete the sysbuild.conf-File thus not implementing the DFU i suppose?)
EMPTY_0: address: 0x164000 end_address: 0x165000 placement: after: - mcuboot_secondary region: flash_primary size: 0x1000 app: address: 0x64600 end_address: 0xbc000 region: flash_primary size: 0x57a00 mcuboot: address: 0x0 end_address: 0xc000 placement: align: end: 0x1000 before: - mcuboot_primary region: flash_primary size: 0xc000 mcuboot_pad: address: 0x14000 end_address: 0x14800 placement: align: start: 0x1000 before: - mcuboot_primary_app region: flash_primary size: 0x800 mcuboot_primary: address: 0x14000 end_address: 0xbc000 orig_span: &id001 - app - tfm - mcuboot_pad region: flash_primary sharers: 0x1 size: 0xa8000 span: *id001 mcuboot_primary_app: address: 0x14800 end_address: 0xbc000 orig_span: &id002 - app - tfm region: flash_primary size: 0xa7800 span: *id002 mcuboot_secondary: address: 0xbc000 end_address: 0x164000 placement: after: - mcuboot_primary align: start: 0x1000 align_next: 0x1000 region: flash_primary share_size: - mcuboot_primary size: 0xa8000 mcuboot_sram: address: 0x20000000 end_address: 0x20013000 orig_span: &id003 - tfm_sram region: sram_primary size: 0x13000 span: *id003 otp: address: 0xffd500 end_address: 0xffd9fc region: otp size: 0x4fc sram_nonsecure: address: 0x20013000 end_address: 0x2002f000 orig_span: &id004 - sram_primary region: sram_primary size: 0x1c000 span: *id004 sram_primary: address: 0x20013000 end_address: 0x2002f000 region: sram_primary size: 0x1c000 sram_secure: address: 0x20000000 end_address: 0x20013000 orig_span: &id005 - tfm_sram region: sram_primary size: 0x13000 span: *id005 tfm: address: 0x14800 end_address: 0x64600 inside: - mcuboot_primary_app placement: before: - app region: flash_primary size: 0x4fe00 tfm_its: address: 0xc000 end_address: 0xe000 inside: - tfm_storage placement: before: - tfm_otp_nv_counters region: flash_primary size: 0x2000 tfm_nonsecure: address: 0x64600 end_address: 0xbc000 orig_span: &id006 - app region: flash_primary size: 0x57a00 span: *id006 tfm_otp_nv_counters: address: 0xe000 end_address: 0x10000 inside: - tfm_storage placement: before: - tfm_ps region: flash_primary size: 0x2000 tfm_ps: address: 0x10000 end_address: 0x14000 inside: - tfm_storage placement: after: - mcuboot - tfm_secure region: flash_primary size: 0x4000 tfm_secure: address: 0x14000 end_address: 0x64600 orig_span: &id007 - mcuboot_pad - tfm region: flash_primary size: 0x50600 span: *id007 tfm_sram: address: 0x20000000 end_address: 0x20013000 inside: - sram_secure placement: after: - start region: sram_primary size: 0x13000 tfm_storage: address: 0xc000 end_address: 0x14000 orig_span: &id008 - tfm_ps - tfm_its - tfm_otp_nv_counters region: flash_primary size: 0x8000 span: *id008
I understand that i need to define custom partitions taht are properly aligned to the CONFIG_NRF_TRUSTZONE_FLASH_REGION_SIZE wich defaults to 0x1000 (as it is in the KCONFIG file in the board definition).
Can you please point out to me what is wrong and how i define this correctly?
Maybe you also have resources on how to define a static partitioning-table for your diffrent board-targets as we are currently also in development for a project using the nrf52-Series wich will encounter similar problems i suppose.