diff --git a/boards/st/nucleo_h7s3l8/board.cmake b/boards/st/nucleo_h7s3l8/board.cmake index e0005d1dc825..e8e3426630bb 100644 --- a/boards/st/nucleo_h7s3l8/board.cmake +++ b/boards/st/nucleo_h7s3l8/board.cmake @@ -2,6 +2,9 @@ # keep first board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw") +if(CONFIG_XIP AND (CONFIG_STM32_MEMMAP OR CONFIG_BOOTLOADER_MCUBOOT)) + board_runner_args(stm32cubeprogrammer "--extload=MX25UW25645G_NUCLEO-H7S3L8.stldr") +endif() board_runner_args(openocd --target-handle=_CHIPNAME.cpu0) diff --git a/boards/st/nucleo_h7s3l8/nucleo_h7s3l8.dts b/boards/st/nucleo_h7s3l8/nucleo_h7s3l8.dts index 2e7435bb95ce..cdccc442c2c4 100644 --- a/boards/st/nucleo_h7s3l8/nucleo_h7s3l8.dts +++ b/boards/st/nucleo_h7s3l8/nucleo_h7s3l8.dts @@ -57,6 +57,15 @@ led2 = &red_led; sw0 = &user_button; watchdog0 = &iwdg; + spi-flash0 = &mx25uw25645; + }; + + ext_memory: memory@70000000 { + compatible = "zephyr,memory-region"; + reg = <0x70000000 DT_SIZE_M(64)>; + zephyr,memory-region = "EXTMEM"; + /* The ATTR_MPU_EXTMEM attribut causing a MPU FAULT */ + zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>; }; }; @@ -189,6 +198,7 @@ ospi-max-frequency = ; spi-bus-width = ; data-rate = ; + four-byte-opcodes; status = "okay"; partitions { diff --git a/boards/st/stm32h7s78_dk/board.cmake b/boards/st/stm32h7s78_dk/board.cmake index 9de6ed63802b..fed92daa44d2 100644 --- a/boards/st/stm32h7s78_dk/board.cmake +++ b/boards/st/stm32h7s78_dk/board.cmake @@ -2,6 +2,10 @@ # keep first board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw") +if(CONFIG_XIP AND (CONFIG_STM32_MEMMAP OR CONFIG_BOOTLOADER_MCUBOOT)) + board_runner_args(stm32cubeprogrammer "--extload=MX66UW1G45G_STM32H7S78-DK.stldr") +endif() + board_runner_args(openocd --target-handle=_CHIPNAME.cpu0) # keep first diff --git a/boards/st/stm32h7s78_dk/stm32h7s78_dk.dts b/boards/st/stm32h7s78_dk/stm32h7s78_dk.dts index d43fa8cee484..1406a07d2af3 100644 --- a/boards/st/stm32h7s78_dk/stm32h7s78_dk.dts +++ b/boards/st/stm32h7s78_dk/stm32h7s78_dk.dts @@ -69,6 +69,15 @@ die-temp0 = &die_temp; volt-sensor0 = &vref; volt-sensor1 = &vbat; + spi-flash0 = &mx66uw1g45; + }; + + ext_memory: memory@70000000 { + compatible = "zephyr,memory-region"; + reg = <0x70000000 DT_SIZE_M(64)>; + zephyr,memory-region = "EXTMEM"; + /* The ATTR_MPU_EXTMEM attribut causing a MPU FAULT */ + zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>; }; }; @@ -244,6 +253,7 @@ ospi-max-frequency = ; spi-bus-width = ; data-rate = ; + four-byte-opcodes; status = "okay"; partitions { diff --git a/samples/application_development/code_relocation_nocopy/boards/nucleo_h7s3l8.conf b/samples/application_development/code_relocation_nocopy/boards/nucleo_h7s3l8.conf new file mode 100644 index 000000000000..eac2504a7850 --- /dev/null +++ b/samples/application_development/code_relocation_nocopy/boards/nucleo_h7s3l8.conf @@ -0,0 +1,2 @@ +CONFIG_FLASH=y +CONFIG_STM32_MEMMAP=y diff --git a/samples/application_development/code_relocation_nocopy/boards/stm32h7s78_dk.conf b/samples/application_development/code_relocation_nocopy/boards/stm32h7s78_dk.conf new file mode 100644 index 000000000000..eac2504a7850 --- /dev/null +++ b/samples/application_development/code_relocation_nocopy/boards/stm32h7s78_dk.conf @@ -0,0 +1,2 @@ +CONFIG_FLASH=y +CONFIG_STM32_MEMMAP=y diff --git a/samples/sysbuild/with_mcuboot/boards/nucleo_h7s3l8.overlay b/samples/sysbuild/with_mcuboot/boards/nucleo_h7s3l8.overlay new file mode 100644 index 000000000000..7af649b38c65 --- /dev/null +++ b/samples/sysbuild/with_mcuboot/boards/nucleo_h7s3l8.overlay @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2025 STMicroelectronics + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/* + * Define the device, controller and partition to be the external memory + * for running the application in external NOR from MCUboot + */ +/ { + chosen { + zephyr,flash = &mx25uw25645; + zephyr,flash-controller = &mx25uw25645; + zephyr,code-partition = &slot0_partition; + }; +}; diff --git a/samples/sysbuild/with_mcuboot/boards/stm32h7s78_dk.overlay b/samples/sysbuild/with_mcuboot/boards/stm32h7s78_dk.overlay new file mode 100644 index 000000000000..d5054ef5cb11 --- /dev/null +++ b/samples/sysbuild/with_mcuboot/boards/stm32h7s78_dk.overlay @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2025 STMicroelectronics + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/* + * Define the device, controller and partition to be the external memory + * for running the application in external NOR from MCUboot + */ +/ { + chosen { + zephyr,flash = &mx66uw1g45; + zephyr,flash-controller = &mx66uw1g45; + zephyr,code-partition = &slot0_partition; + }; +}; diff --git a/samples/sysbuild/with_mcuboot/sample.yaml b/samples/sysbuild/with_mcuboot/sample.yaml index e1980ff30c1c..4a0e53d942d8 100644 --- a/samples/sysbuild/with_mcuboot/sample.yaml +++ b/samples/sysbuild/with_mcuboot/sample.yaml @@ -14,6 +14,8 @@ tests: - esp32s3_devkitm/esp32s3/procpu - esp32c3_devkitm - esp32c6_devkitc/esp32c6/hpcore + - nucleo_h7s3l8 + - stm32h7s78_dk integration_platforms: - nrf52840dk/nrf52840 - esp32_devkitc/esp32/procpu