From 0a52195c8181f351d483e6f98e626a84dcd43e14 Mon Sep 17 00:00:00 2001 From: Thomas Decker Date: Wed, 19 Nov 2025 10:52:15 +0100 Subject: [PATCH] boot: zephyr: socs: stm32h7s3xx: Add support for ext_flash_app variant On the same example as stm32h7s7xx, introduce ext_flash_app variant for stm32h7s3xx in mcuboot. This allows chainloading applications in ext flash from a mcuboot application running in internal flash. Similarly, BOOT_MAX_IMG_SECTORS_AUTO is no longer needed to be disabled after including the 'soc-nv-flash' binding in the 'st,stm32-xspi-nor' binding, which provides 'erase-block-size' and 'write-block-size' to external Flash DT node. Remove the no longer required Kconfig fragment for nucleo_h7s3l8. Signed-off-by: Thomas Decker --- boot/zephyr/boards/nucleo_h7s3l8.conf | 4 ---- boot/zephyr/socs/stm32h7s3xx_ext_flash_app.conf | 1 + boot/zephyr/socs/stm32h7s3xx_ext_flash_app.overlay | 7 +++++++ 3 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 boot/zephyr/boards/nucleo_h7s3l8.conf create mode 100644 boot/zephyr/socs/stm32h7s3xx_ext_flash_app.conf create mode 100644 boot/zephyr/socs/stm32h7s3xx_ext_flash_app.overlay diff --git a/boot/zephyr/boards/nucleo_h7s3l8.conf b/boot/zephyr/boards/nucleo_h7s3l8.conf deleted file mode 100644 index 93013ed9a1..0000000000 --- a/boot/zephyr/boards/nucleo_h7s3l8.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_BOOT_DIRECT_XIP=y -CONFIG_STM32_MEMMAP=y -CONFIG_BOOT_MAX_IMG_SECTORS_AUTO=n -CONFIG_BOOT_MAX_IMG_SECTORS=4096 diff --git a/boot/zephyr/socs/stm32h7s3xx_ext_flash_app.conf b/boot/zephyr/socs/stm32h7s3xx_ext_flash_app.conf new file mode 100644 index 0000000000..2e008f3292 --- /dev/null +++ b/boot/zephyr/socs/stm32h7s3xx_ext_flash_app.conf @@ -0,0 +1 @@ +CONFIG_STM32_MEMMAP=y \ No newline at end of file diff --git a/boot/zephyr/socs/stm32h7s3xx_ext_flash_app.overlay b/boot/zephyr/socs/stm32h7s3xx_ext_flash_app.overlay new file mode 100644 index 0000000000..0d8b3f5f11 --- /dev/null +++ b/boot/zephyr/socs/stm32h7s3xx_ext_flash_app.overlay @@ -0,0 +1,7 @@ +/ { + chosen { + zephyr,flash = &flash0; + zephyr,flash-controller = &flash; + zephyr,code-partition = &boot_partition; + }; +};