From 94960b9f2e16675e9b32fea4b5a4ee20596e2496 Mon Sep 17 00:00:00 2001 From: Abderrahmane JARMOUNI Date: Mon, 6 Oct 2025 00:59:49 +0200 Subject: [PATCH] boot: zephyr: rework stm32h750b_dk board overlay & conf Following the introduction of stm32h750b-dk 'ext_flash_app' board variant, for storing apps in external Flash and chainloading them with MCUboot that's placed in internal Flash, we need a DT overlay to designate internal Flash & controller as the chosen 'zephyr,flash' & 'zephyr,flash-controller' for the MCUboot Zephyr Application. BOOT_MAX_IMG_SECTORS_AUTO no longer need to be disabled after including the 'soc-nv-flash' compatible in the board's external flash node, & declaring the 'erase-block-size' & 'write-block-size' properties. Signed-off-by: Abderrahmane JARMOUNI --- boot/zephyr/boards/stm32h750b_dk.conf | 4 ---- boot/zephyr/socs/stm32h750xx_ext_flash_app.conf | 1 + boot/zephyr/socs/stm32h750xx_ext_flash_app.overlay | 7 +++++++ 3 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 boot/zephyr/boards/stm32h750b_dk.conf create mode 100644 boot/zephyr/socs/stm32h750xx_ext_flash_app.conf create mode 100644 boot/zephyr/socs/stm32h750xx_ext_flash_app.overlay diff --git a/boot/zephyr/boards/stm32h750b_dk.conf b/boot/zephyr/boards/stm32h750b_dk.conf deleted file mode 100644 index ba48f0ae95..0000000000 --- a/boot/zephyr/boards/stm32h750b_dk.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_STM32_MEMMAP=y - -CONFIG_BOOT_MAX_IMG_SECTORS_AUTO=n -CONFIG_BOOT_MAX_IMG_SECTORS=4096 diff --git a/boot/zephyr/socs/stm32h750xx_ext_flash_app.conf b/boot/zephyr/socs/stm32h750xx_ext_flash_app.conf new file mode 100644 index 0000000000..2e008f3292 --- /dev/null +++ b/boot/zephyr/socs/stm32h750xx_ext_flash_app.conf @@ -0,0 +1 @@ +CONFIG_STM32_MEMMAP=y \ No newline at end of file diff --git a/boot/zephyr/socs/stm32h750xx_ext_flash_app.overlay b/boot/zephyr/socs/stm32h750xx_ext_flash_app.overlay new file mode 100644 index 0000000000..0d8b3f5f11 --- /dev/null +++ b/boot/zephyr/socs/stm32h750xx_ext_flash_app.overlay @@ -0,0 +1,7 @@ +/ { + chosen { + zephyr,flash = &flash0; + zephyr,flash-controller = &flash; + zephyr,code-partition = &boot_partition; + }; +};