Hi,
I have a firmware running on ncs 2.2 with mcuboot and tfm which I'm in the process of upgrading to ncs 2.7 with sysbuild.
I currently have a problem converting the pm_static.yml file from ncs 2.2 to ncs 2.7.
The first problem that occurred was fixed following this Thread
I'm able to build the application successfully on ncs 2.7 but the application will not start. It seems like the bootloader is placed at 0x8200 and not 0x0 while the application seems to be placed correctly at 0x30200 like the build on ncs 2.2.
If I use the partition manager for dynamic allocation the firmware boots fine and bootloader is placed at 0x0000 but the application is no longer placed at 0x30200 which I assume the bootloader from ncs 2.2 expects.
Looking at partition.yml from the dynamic allocation it looks like b0, b0_container, s0, s0_image, s0_pad , s1, s1_image and s1_pad is no longer used.
I don't have any clue on how to move forward with the migration.
I have attached the following files, which I had to change file type from yml to txt because yml file type seems to be blocked:
pm_static_2.2.txt <-- static file used on ncs 2.2
pm_static_2_7.txt <-- static file used on ncs 2.7 which build but seems to have bootloader placed at wrong address and doesn't boot application
partitions.txt <-- File from partition manager made dynamically on ncs 2.7 which boots the application successfully.
EMPTY_0: address: 0x14200 end_address: 0x18000 placement: before: - s1_pad region: flash_primary size: 0x3e00 EMPTY_1: address: 0x24200 end_address: 0x28000 placement: before: - mcuboot_pad region: flash_primary size: 0x3e00 EMPTY_2: address: 0xfa000 end_address: 0x100000 placement: after: - settings_storage region: flash_primary size: 0x6000 EMPTY_3: address: 0xf6000 end_address: 0xf8000 placement: after: - nvs_storage region: flash_primary size: 0x2000 EMPTY_4: address: 0xe8000 end_address: 0xf0000 placement: after: - mcuboot_secondary region: flash_primary size: 0x8000 app: address: 0x30200 end_address: 0x88000 region: flash_primary size: 0x57e00 app_image: address: 0x28200 end_address: 0x88000 orig_span: &id001 - tfm - app region: flash_primary size: 0x5fe00 span: *id001 b0: address: 0x0 end_address: 0x8000 placement: after: - start region: flash_primary size: 0x8000 b0_container: address: 0x0 end_address: 0x8000 orig_span: &id002 - b0 region: flash_primary size: 0x8000 span: *id002 mcuboot: address: 0x8200 end_address: 0x14200 placement: before: - mcuboot_primary region: flash_primary sharers: 0x1 size: 0xc000 mcuboot_pad: address: 0x30000 end_address: 0x30200 placement: align: start: 0x8000 before: - mcuboot_primary_app region: flash_primary sharers: 0x2 size: 0x200 mcuboot_primary: address: 0x28000 end_address: 0x88000 orig_span: &id003 - app - mcuboot_pad - tfm region: flash_primary sharers: 0x1 size: 0x60000 span: *id003 mcuboot_primary_app: address: 0x28200 end_address: 0x88000 orig_span: &id004 - app - tfm region: flash_primary size: 0x5fe00 span: *id004 mcuboot_secondary: address: 0x88000 end_address: 0xe8000 placement: after: - mcuboot_primary align: start: 0x8000 region: flash_primary share_size: - mcuboot_primary size: 0x60000 nonsecure_storage: address: 0xf0000 end_address: 0xf8000 orig_span: &id005 - settings_storage - nvs_storage region: flash_primary size: 0x8000 span: *id005 nrf_modem_lib_ctrl: address: 0x20008000 end_address: 0x200084e8 inside: - sram_nonsecure placement: after: - tfm_sram - start region: sram_primary size: 0x4e8 nrf_modem_lib_rx: address: 0x2000a4e8 end_address: 0x2000c4e8 inside: - sram_nonsecure placement: after: - nrf_modem_lib_tx region: sram_primary size: 0x2000 nrf_modem_lib_sram: address: 0x20008000 end_address: 0x2000c4e8 orig_span: &id006 - nrf_modem_lib_ctrl - nrf_modem_lib_tx - nrf_modem_lib_rx region: sram_primary size: 0x44e8 span: *id006 nrf_modem_lib_tx: address: 0x200084e8 end_address: 0x2000a4e8 inside: - sram_nonsecure placement: after: - nrf_modem_lib_ctrl region: sram_primary size: 0x2000 nvs_storage: address: 0xf0000 end_address: 0xf6000 inside: - nonsecure_storage placement: align: start: 0x8000 before: - settings_storage region: flash_primary size: 0x6000 otp: address: 0xff8388 end_address: 0xff83fc region: otp size: 0x74 provision: address: 0xff8108 end_address: 0xff8388 region: otp size: 0x280 s0: address: 0x8000 end_address: 0x14200 orig_span: &id007 - s0_pad - mcuboot region: flash_primary size: 0xc200 span: *id007 s0_image: address: 0x8200 end_address: 0x14200 orig_span: &id008 - mcuboot region: flash_primary size: 0xc000 span: *id008 s0_pad: address: 0x8000 end_address: 0x8200 placement: after: - b0_container align: start: 0x8000 region: flash_primary share_size: - mcuboot_pad size: 0x200 s1: address: 0x18000 end_address: 0x24200 orig_span: &id009 - s1_pad - s1_image region: flash_primary size: 0xc200 span: *id009 s1_image: address: 0x18200 end_address: 0x24200 placement: after: - s1_pad - s0 region: flash_primary share_size: - mcuboot size: 0xc000 s1_pad: address: 0x18000 end_address: 0x18200 placement: after: - s0 align: start: 0x8000 region: flash_primary share_size: - mcuboot_pad size: 0x200 settings_storage: address: 0xf8000 end_address: 0xfa000 inside: - nonsecure_storage placement: align: start: 0x8000 before: - end region: flash_primary size: 0x2000 sram_nonsecure: address: 0x20008000 end_address: 0x20040000 orig_span: &id010 - sram_primary - nrf_modem_lib_ctrl - nrf_modem_lib_tx - nrf_modem_lib_rx region: sram_primary size: 0x38000 span: *id010 sram_primary: address: 0x2000c4e8 end_address: 0x20040000 region: sram_primary size: 0x33b18 sram_secure: address: 0x20000000 end_address: 0x20008000 orig_span: &id011 - tfm_sram region: sram_primary size: 0x8000 span: *id011 tfm: address: 0x28000 end_address: 0x30000 inside: - mcuboot_primary_app placement: before: - app region: flash_primary size: 0x8000 tfm_nonsecure: address: 0x30000 end_address: 0x87E00 orig_span: &id012 - app region: flash_primary size: 0x57e00 span: *id012 tfm_secure: address: 0x28000 end_address: 0x30200 orig_span: &id013 - mcuboot_pad - tfm region: flash_primary size: 0x8200 span: *id013 tfm_sram: address: 0x20000000 end_address: 0x20008000 inside: - sram_secure placement: after: - start region: sram_primary size: 0x8000
EMPTY_0: address: 0xc000 end_address: 0x10000 placement: before: - mcuboot_pad region: flash_primary size: 0x4000 EMPTY_1: address: 0xfa000 end_address: 0x100000 placement: after: - settings_storage region: flash_primary size: 0x6000 EMPTY_2: address: 0xf6000 end_address: 0xf8000 placement: after: - nvs_storage region: flash_primary size: 0x2000 app: address: 0x18000 end_address: 0x80000 region: flash_primary size: 0x68000 mcuboot: address: 0x0 end_address: 0xc000 placement: before: - mcuboot_primary region: flash_primary size: 0xc000 mcuboot_pad: address: 0x10000 end_address: 0x10200 placement: align: start: 0x8000 before: - mcuboot_primary_app region: flash_primary size: 0x200 mcuboot_primary: address: 0x10000 end_address: 0x80000 orig_span: &id001 - mcuboot_pad - tfm - app region: flash_primary sharers: 0x1 size: 0x70000 span: *id001 mcuboot_primary_app: address: 0x10200 end_address: 0x80000 orig_span: &id002 - app - tfm region: flash_primary size: 0x6fe00 span: *id002 mcuboot_secondary: address: 0x80000 end_address: 0xf0000 placement: after: - mcuboot_primary align: start: 0x8000 region: flash_primary share_size: - mcuboot_primary size: 0x70000 mcuboot_sram: address: 0x20000000 end_address: 0x20008000 orig_span: &id003 - tfm_sram region: sram_primary size: 0x8000 span: *id003 nonsecure_storage: address: 0xf0000 end_address: 0xfa000 orig_span: &id004 - settings_storage - nvs_storage region: flash_primary size: 0xa000 span: *id004 nrf_modem_lib_ctrl: address: 0x20008000 end_address: 0x200084e8 inside: - sram_nonsecure placement: after: - tfm_sram - start region: sram_primary size: 0x4e8 nrf_modem_lib_rx: address: 0x2000a568 end_address: 0x2000c568 inside: - sram_nonsecure placement: after: - nrf_modem_lib_tx region: sram_primary size: 0x2000 nrf_modem_lib_sram: address: 0x20008000 end_address: 0x2000c568 orig_span: &id005 - nrf_modem_lib_ctrl - nrf_modem_lib_tx - nrf_modem_lib_rx region: sram_primary size: 0x4568 span: *id005 nrf_modem_lib_tx: address: 0x200084e8 end_address: 0x2000a568 inside: - sram_nonsecure placement: after: - nrf_modem_lib_ctrl region: sram_primary size: 0x2080 nvs_storage: address: 0xf0000 end_address: 0xf6000 inside: - nonsecure_storage placement: align: start: 0x8000 before: - settings_storage region: flash_primary size: 0x6000 otp: address: 0xff8108 end_address: 0xff83fc region: otp size: 0x2f4 settings_storage: address: 0xf8000 end_address: 0xfa000 inside: - nonsecure_storage placement: align: start: 0x8000 before: - end region: flash_primary size: 0x2000 sram_nonsecure: address: 0x20008000 end_address: 0x20040000 orig_span: &id006 - sram_primary - nrf_modem_lib_ctrl - nrf_modem_lib_tx - nrf_modem_lib_rx region: sram_primary size: 0x38000 span: *id006 sram_primary: address: 0x2000c568 end_address: 0x20040000 region: sram_primary size: 0x33a98 sram_secure: address: 0x20000000 end_address: 0x20008000 orig_span: &id007 - tfm_sram region: sram_primary size: 0x8000 span: *id007 tfm: address: 0x10200 end_address: 0x18000 inside: - mcuboot_primary_app placement: before: - app region: flash_primary size: 0x7e00 tfm_nonsecure: address: 0x18000 end_address: 0x80000 orig_span: &id008 - app region: flash_primary size: 0x68000 span: *id008 tfm_secure: address: 0x10000 end_address: 0x18000 orig_span: &id009 - mcuboot_pad - tfm region: flash_primary size: 0x8000 span: *id009 tfm_sram: address: 0x20000000 end_address: 0x20008000 inside: - sram_secure placement: after: - start region: sram_primary size: 0x8000
EMPTY_0: address: 0x14200 end_address: 0x18000 placement: before: - s1_pad region: flash_primary size: 0x3e00 EMPTY_1: address: 0x24200 end_address: 0x28000 placement: before: - mcuboot_pad region: flash_primary size: 0x3e00 EMPTY_2: address: 0xfa000 end_address: 0x100000 placement: after: - settings_storage region: flash_primary size: 0x6000 EMPTY_3: address: 0xf6000 end_address: 0xf8000 placement: after: - nvs_storage region: flash_primary size: 0x2000 EMPTY_4: address: 0xe8000 end_address: 0xf0000 placement: after: - mcuboot_secondary region: flash_primary size: 0x8000 app: address: 0x30200 end_address: 0x88000 region: flash_primary size: 0x57e00 app_image: address: 0x28200 end_address: 0x88000 orig_span: &id001 - tfm - app region: flash_primary size: 0x5fe00 span: *id001 b0: address: 0x0 end_address: 0x8000 placement: after: - start region: flash_primary size: 0x8000 b0_container: address: 0x0 end_address: 0x8000 orig_span: &id002 - b0 region: flash_primary size: 0x8000 span: *id002 mcuboot: address: 0x8200 end_address: 0x14200 placement: before: - mcuboot_primary region: flash_primary sharers: 0x1 size: 0xc000 mcuboot_pad: address: 0x28000 end_address: 0x28200 placement: align: start: 0x8000 before: - mcuboot_primary_app region: flash_primary sharers: 0x2 size: 0x200 mcuboot_primary: address: 0x28000 end_address: 0x88000 orig_span: &id003 - app - mcuboot_pad - tfm region: flash_primary sharers: 0x1 size: 0x60000 span: *id003 mcuboot_primary_app: address: 0x28200 end_address: 0x88000 orig_span: &id004 - app - tfm region: flash_primary size: 0x5fe00 span: *id004 mcuboot_secondary: address: 0x88000 end_address: 0xe8000 placement: after: - mcuboot_primary align: start: 0x8000 region: flash_primary share_size: - mcuboot_primary size: 0x60000 nonsecure_storage: address: 0xf0000 end_address: 0xf8000 orig_span: &id005 - settings_storage - nvs_storage region: flash_primary size: 0x8000 span: *id005 nrf_modem_lib_ctrl: address: 0x20008000 end_address: 0x200084e8 inside: - sram_nonsecure placement: after: - tfm_sram - start region: sram_primary size: 0x4e8 nrf_modem_lib_rx: address: 0x2000a4e8 end_address: 0x2000c4e8 inside: - sram_nonsecure placement: after: - nrf_modem_lib_tx region: sram_primary size: 0x2000 nrf_modem_lib_sram: address: 0x20008000 end_address: 0x2000c4e8 orig_span: &id006 - nrf_modem_lib_ctrl - nrf_modem_lib_tx - nrf_modem_lib_rx region: sram_primary size: 0x44e8 span: *id006 nrf_modem_lib_tx: address: 0x200084e8 end_address: 0x2000a4e8 inside: - sram_nonsecure placement: after: - nrf_modem_lib_ctrl region: sram_primary size: 0x2000 nvs_storage: address: 0xf0000 end_address: 0xf6000 inside: - nonsecure_storage placement: align: start: 0x8000 before: - settings_storage region: flash_primary size: 0x6000 otp: address: 0xff8388 end_address: 0xff83fc region: otp size: 0x74 provision: address: 0xff8108 end_address: 0xff8388 region: otp size: 0x280 s0: address: 0x8000 end_address: 0x14200 orig_span: &id007 - s0_pad - mcuboot region: flash_primary size: 0xc200 span: *id007 s0_image: address: 0x8200 end_address: 0x14200 orig_span: &id008 - mcuboot region: flash_primary size: 0xc000 span: *id008 s0_pad: address: 0x8000 end_address: 0x8200 placement: after: - b0_container align: start: 0x8000 region: flash_primary share_size: - mcuboot_pad size: 0x200 s1: address: 0x18000 end_address: 0x24200 orig_span: &id009 - s1_pad - s1_image region: flash_primary size: 0xc200 span: *id009 s1_image: address: 0x18200 end_address: 0x24200 placement: after: - s1_pad - s0 region: flash_primary share_size: - mcuboot size: 0xc000 s1_pad: address: 0x18000 end_address: 0x18200 placement: after: - s0 align: start: 0x8000 region: flash_primary share_size: - mcuboot_pad size: 0x200 settings_storage: address: 0xf8000 end_address: 0xfa000 inside: - nonsecure_storage placement: align: start: 0x8000 before: - end region: flash_primary size: 0x2000 sram_nonsecure: address: 0x20008000 end_address: 0x20040000 orig_span: &id010 - sram_primary - nrf_modem_lib_ctrl - nrf_modem_lib_tx - nrf_modem_lib_rx region: sram_primary size: 0x38000 span: *id010 sram_primary: address: 0x2000c4e8 end_address: 0x20040000 region: sram_primary size: 0x33b18 sram_secure: address: 0x20000000 end_address: 0x20008000 orig_span: &id011 - tfm_sram region: sram_primary size: 0x8000 span: *id011 tfm: address: 0x28200 end_address: 0x30200 inside: - mcuboot_primary_app placement: before: - app region: flash_primary size: 0x8000 tfm_nonsecure: address: 0x30200 end_address: 0x88000 orig_span: &id012 - app region: flash_primary size: 0x57e00 span: *id012 tfm_secure: address: 0x28000 end_address: 0x30200 orig_span: &id013 - mcuboot_pad - tfm region: flash_primary size: 0x8200 span: *id013 tfm_sram: address: 0x20000000 end_address: 0x20008000 inside: - sram_secure placement: after: - start region: sram_primary size: 0x8000