Issue with Partition Manager to Devicetree migration on nRF54L15 (MCUboot + TF-M)

Hello.

I am currently migrating a project from NCS v3.2.4 to v3.3.1 and transitioning from Partition Manager to devicetree-based partitioning, following the official migration guide:
https://nrfconnectdocs.nordicsemi.com/ncs/latest/nrf/releases_and_maturity/migration/migration_partitions.html

While the build process succeeds using the generated .overlay files, the application fails to boot after MCUboot.
It enters a continuous reboot loop.

Serial Terminal Log:

*** Booting MCUboot v2.3.0-dev-3de5b4df5f9f ***
*** Using nRF Connect SDK v3.3.1-1d7a0b0e49b8 ***
*** Using Zephyr OS v4.3.99-37e6c28576ee ***
I: Starting bootloader
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x14000
I: Image version: v0.3.0
I: Jumping to the first image slot
*** Booting MCUboot v2.3.0-dev-3de5b4df5f9f ***
... (loop repeats)

Configuration Details:

  • Device: nRF54L15
  • Setup: MCUboot + TF-M
  • Context: I have been unable to find specific examples for an nRF54L15 setup with both MCUboot and TF-M using the new devicetree partitioning method.

Attached Files:

  • pm_static.yml: Original working partition configuration.
  • generate.overlay: Generated via pm_to_dts.py.
  • app.overlay: Modified version of the generated file
    (removed redundant nodes, and manually adjusted cpuapp_sram to reflect previous Kconfig settings:
    CONFIG_PM_PARTITION_SIZE_TFM=0x1F800 and CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0x10000).
  • mcuboot.overlay: File used for MCUboot.

app:
  address: 0x34000
  end_address: 0xc6000
  region: flash_primary
  size: 0x92000
mcuboot:
  address: 0x0
  end_address: 0xc000
  region: flash_primary
  size: 0xc000
mcuboot_pad:
  address: 0x14000
  end_address: 0x14800
  region: flash_primary
  size: 0x800
mcuboot_primary:
  address: 0x14000
  end_address: 0xc6000
  orig_span: &id001
  - mcuboot_pad
  - tfm
  - app
  region: flash_primary
  size: 0xb2000
  span: *id001
mcuboot_primary_app:
  address: 0x14800
  end_address: 0xc6000
  orig_span: &id002
  - tfm
  - app
  region: flash_primary
  size: 0xb1800
  span: *id002
mcuboot_secondary:
  address: 0xc6000
  end_address: 0x141000
  region: flash_primary
  size: 0x7B000
littlefs_storage:
  address: 0x141000
  end_address: 0x155000
  region: flash_primary
  size: 0x14000
settings_storage:
  address: 0x155000
  end_address: 0x165000
  region: flash_primary
  size: 0x10000
tfm_its:
  address: 0xc000
  end_address: 0xe000
  region: flash_primary
  size: 0x2000
tfm_otp_nv_counters:
  address: 0xe000
  end_address: 0x10000
  region: flash_primary
  size: 0x2000
tfm_ps:
  address: 0x10000
  end_address: 0x14000
  region: flash_primary
  size: 0x4000
tfm:
  address: 0x14800
  end_address: 0x34000
  region: flash_primary
  size: 0x1f800
nonsecure_storage:
  address: 0x155000
  end_address: 0x165000
  orig_span: &id004
  - settings_storage
  region: flash_primary
  size: 0x10000
  span: *id004
tfm_nonsecure:
  address: 0x34000
  end_address: 0xc6000
  orig_span: &id007
  - app
  region: flash_primary
  size: 0x92000
  span: *id007
tfm_secure:
  address: 0x14000
  end_address: 0x34000
  orig_span: &id008
  - mcuboot_pad
  - tfm
  region: flash_primary
  size: 0x20000
  span: *id008
tfm_storage:
  address: 0xc000
  end_address: 0x14000
  orig_span: &id009
  - tfm_its
  - tfm_otp_nv_counters
  - tfm_ps
  region: flash_primary
  size: 0x8000
  span: *id009

&cpuapp_rram {
	partitions {
		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x0 0xc000>;
		};

		tfm_its_partition: partition@c000 {
			label = "tfm-its";
			reg = <0xc000 0x2000>;
		};

		tfm_otp_partition: partition@e000 {
			label = "tfm-otp";
			reg = <0xe000 0x2000>;
		};

		tfm_ps_partition: partition@10000 {
			label = "tfm-ps";
			reg = <0x10000 0x4000>;
		};

		slot0_partition: partition@14000 {
			compatible = "fixed-subpartitions";
			label = "image-0";
			reg = <0x14000 0xb2000>;
			ranges = <0x0 0x14000 0xb2000>;
			#address-cells = <1>;
			#size-cells = <1>;

			slot0_s_partition: partition@0 {
				label = "image-0-secure";
				reg = <0x0 0x20000>;
			};

			slot0_ns_partition: partition@20000 {
				label = "image-0-nonsecure";
				reg = <0x20000 0x92000>;
			};
		};

		slot1_partition: partition@c6000 {
			label = "image-1";
			reg = <0xc6000 0x7b000>;
		};

		littlefs_storage: partition@141000 {
			label = "littlefs-storage";
			reg = <0x141000 0x14000>;
		};

		nonsecure_storage: partition@155000 {
			label = "nonsecure-storage";
			reg = <0x155000 0x10000>;
		};

		storage_partition: partition@155000 {
			label = "storage";
			reg = <0x155000 0x10000>;
		};
	};
};

/delete-node/ &sram0_ns;

&cpuapp_sram {
	sram0_s: image_s@0 {
		/* Secure image memory */
		reg = <0x0 DT_SIZE_K(64)>;
		ranges = <0x0 0x0 DT_SIZE_K(64)>;
	};

	sram0_ns: image_ns@10000 {
		#address-cells = <1>;
		#size-cells = <1>;
		/* Non-Secure image memory */
		reg = <0x10000 DT_SIZE_K(192)>;
		ranges = <0x0 0x10000 DT_SIZE_K(192)>;
	};
};

/delete-node/ &slot0_partition;
/delete-node/ &tfm_ps_partition;
/delete-node/ &tfm_its_partition;
/delete-node/ &tfm_otp_partition;
/delete-node/ &slot0_ns_partition;
/delete-node/ &storage_partition;

&cpuapp_rram {
	partitions {
		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x0 0xc000>;
		};

		tfm_its_partition: partition@c000 {
			label = "tfm-its";
			reg = <0xc000 0x2000>;
		};

		tfm_otp_partition: partition@e000 {
			label = "tfm-otp";
			reg = <0xe000 0x2000>;
		};

		tfm_ps_partition: partition@10000 {
			label = "tfm-ps";
			reg = <0x10000 0x4000>;
		};

		slot0_partition: partition@14000 {
			compatible = "fixed-subpartitions";
			label = "image-0";
			reg = <0x14000 0xb2000>;
			ranges = <0x0 0x14000 0xb2000>;
			#address-cells = <1>;
			#size-cells = <1>;

			slot0_s_partition: partition@0 {
				label = "image-0-secure";
				reg = <0x0 0x20000>;
			};

			slot0_ns_partition: partition@20000 {
				label = "image-0-nonsecure";
				reg = <0x20000 0x92000>;
			};
		};

		slot1_partition: partition@c6000 {
			label = "image-1";
			reg = <0xc6000 0x7b000>;
		};

		littlefs_storage: partition@141000 {
			label = "littlefs-storage";
			reg = <0x141000 0x14000>;
		};

		storage_partition: partition@155000 {
			label = "storage";
			reg = <0x155000 0x10000>;
		};
	};
};

/ {
	chosen {
		zephyr,code-partition = &boot_partition;
	};
};

/delete-node/ &boot_partition;
/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
/delete-node/ &storage_partition;

&cpuapp_rram {
	partitions {
		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x0 0xc000>;
		};

		tfm_its_partition: partition@c000 {
			label = "tfm-its";
			reg = <0xc000 0x2000>;
		};

		tfm_otp_partition: partition@e000 {
			label = "tfm-otp";
			reg = <0xe000 0x2000>;
		};

		tfm_ps_partition: partition@10000 {
			label = "tfm-ps";
			reg = <0x10000 0x4000>;
		};

		slot0_partition: partition@14000 {
			compatible = "fixed-subpartitions";
			label = "image-0";
			reg = <0x14000 0xb2000>;
			ranges = <0x0 0x14000 0xb2000>;
			#address-cells = <1>;
			#size-cells = <1>;

			slot0_s_partition: partition@0 {
				label = "image-0-secure";
				reg = <0x0 0x20000>;
			};

			slot0_ns_partition: partition@20000 {
				label = "image-0-nonsecure";
				reg = <0x20000 0x92000>;
			};
		};

		slot1_partition: partition@c6000 {
			label = "image-1";
			reg = <0xc6000 0x7b000>;
		};

		littlefs_storage: partition@141000 {
			label = "littlefs-storage";
			reg = <0x141000 0x14000>;
		};

		storage_partition: partition@155000 {
			label = "storage";
			reg = <0x155000 0x10000>;
		};
	};
};

Could you please review my configuration and advise on the correct approach for setting up devicetree partitions in an nRF54L15 MCUboot/TF-M environment?

Best regards,

a.da

Related