Commit b5f65f20 authored by Gerson Fernando Budke's avatar Gerson Fernando Budke Committed by Fabio Baltieri
Browse files

boards: arm: stm32l562e_dk_ns: Add flash partitions



The current stm32l562_dk_ns has no flash partitions defined. This add
flash partitions following partition sizes that are compatible with
the TF-M platform defined at flash_layout.h and removes the redundant
overlays board files.

Signed-off-by: default avatarGerson Fernando Budke <gerson.budke@ossystems.com.br>
parent 7cc72955
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@

		/* 2KB at the end of 512KB flash is set for storage */
		storage_partition: partition@7f800 {
			   label = "storage";
			   reg = <0x0007f800 DT_SIZE_K(2)>;
		   };
	};
+26 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
		zephyr,console = &usart1;
		zephyr,shell-uart = &usart1;
		zephyr,sram = &sram0;
		zephyr,flash = &flash0;
		zephyr,code-partition = &slot1_ns_partition;
	};

	aliases {
@@ -26,3 +26,28 @@
		sw0 = &user_button;
	};
};

&flash0 {
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		boot_partition: partition@0 {
			reg = <0x00000000 DT_SIZE_K(100)>;
			read-only;
		};
		/* Secure image primary slot */
		slot0_partition: partition@19000 {
			reg = <0x00019000 DT_SIZE_K(240)>;
		};
		/* Non-secure image primary slot */
		slot1_ns_partition: partition@55000 {
			reg = <0x00055000 DT_SIZE_K(168)>;
		};
		/* 4KB at the end of 512KB flash is set for storage */
		 storage_partition: partition@7f000 {
			reg = <0x0007f000 DT_SIZE_K(4)>;
		};
	};
};
+0 −52
Original line number Diff line number Diff line
/*
 * Copyright (c) 2021 Yestin Sun
 *
 * SPDX-License-Identifier: Apache-2.0
 */

 /* This partition table should be used along with TFM configuration:
  * - TEST_S=OFF (NO REGRESSION)
  *
  * In this configuration, TFM binary does not include tests.
  * The partition sizes are compatible with the TF-M platform
  * flash_layout.h.
  */

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

&flash0 {

	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x00000000 DT_SIZE_K(100)>;
			read-only;
		};
		/* Secure image primary slot */
		slot0_partition: partition@19000 {
			label = "image-0";
			reg = <0x00019000 DT_SIZE_K(240)>;
		};
		/* Non-secure image primary slot */
		slot1_partition: partition@55000 {
			label = "image-1";
			reg = <0x00055000 DT_SIZE_K(168)>;
		};
		/*
		 * The flash starting at 0x7F000 and ending at
		 * 0x80000 is reserved for the application.
		 */
		storage_partition: partition@7f000 {
			label = "storage";
			reg = <0x0007F000 DT_SIZE_K(4)>;
		};
	};
};
+0 −52
Original line number Diff line number Diff line
/*
 * Copyright (c) 2021 Yestin Sun
 *
 * SPDX-License-Identifier: Apache-2.0
 */

 /* This partition table should be used along with TFM configuration:
  * - TEST_S=OFF (NO REGRESSION)
  *
  * In this configuration, TFM binary does not include tests.
  * The partition sizes are compatible with the TF-M platform
  * flash_layout.h.
  */

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

&flash0 {

	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x00000000 DT_SIZE_K(100)>;
			read-only;
		};
		/* Secure image primary slot */
		slot0_partition: partition@19000 {
			label = "image-0";
			reg = <0x00019000 DT_SIZE_K(240)>;
		};
		/* Non-secure image primary slot */
		slot1_partition: partition@55000 {
			label = "image-1";
			reg = <0x00055000 DT_SIZE_K(168)>;
		};
		/*
		 * The flash starting at 0x7F000 and ending at
		 * 0x80000 is reserved for the application.
		 */
		storage_partition: partition@7f000 {
			label = "storage";
			reg = <0x0007F000 DT_SIZE_K(4)>;
		};
	};
};
+0 −52
Original line number Diff line number Diff line
/*
 * Copyright (c) 2021 Yestin Sun
 *
 * SPDX-License-Identifier: Apache-2.0
 */

 /* This partition table should be used along with TFM configuration:
  * - TEST_S=OFF (NO REGRESSION)
  *
  * In this configuration, TFM binary does not include tests.
  * The partition sizes are compatible with the TF-M platform
  * flash_layout.h.
  */

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

&flash0 {

	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x00000000 DT_SIZE_K(100)>;
			read-only;
		};
		/* Secure image primary slot */
		slot0_partition: partition@19000 {
			label = "image-0";
			reg = <0x00019000 DT_SIZE_K(240)>;
		};
		/* Non-secure image primary slot */
		slot1_partition: partition@55000 {
			label = "image-1";
			reg = <0x00055000 DT_SIZE_K(168)>;
		};
		/*
		 * The flash starting at 0x7F000 and ending at
		 * 0x80000 is reserved for the application.
		 */
		storage_partition: partition@7f000 {
			label = "storage";
			reg = <0x0007F000 DT_SIZE_K(4)>;
		};
	};
};
Loading