diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/boards/mimxrt1050_evk_hyperflash_ram_load.conf b/samples/subsys/mgmt/mcumgr/smp_svr/boards/mimxrt1050_evk_hyperflash_ram_load.conf new file mode 100644 index 000000000000..3d5bd27bd6a0 --- /dev/null +++ b/samples/subsys/mgmt/mcumgr/smp_svr/boards/mimxrt1050_evk_hyperflash_ram_load.conf @@ -0,0 +1 @@ +CONFIG_USE_DT_CODE_PARTITION=y diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/boards/mimxrt1050_evk_hyperflash_ram_load.overlay b/samples/subsys/mgmt/mcumgr/smp_svr/boards/mimxrt1050_evk_hyperflash_ram_load.overlay new file mode 100644 index 000000000000..8149e3224ab5 --- /dev/null +++ b/samples/subsys/mgmt/mcumgr/smp_svr/boards/mimxrt1050_evk_hyperflash_ram_load.overlay @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2025 Tenstorrent AI ULC + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/* + * Layout must match the hyperflash_ram_load overlay file within mcuboot + * application configuration directory + */ + +/delete-node/ &sdram0; + +/ { + sram@80007F00 { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x80007F00 0x100>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + + boot_info0: boot_info@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x100>; + }; + }; + }; + + chosen { + zephyr,bootloader-info = &boot_info0; + zephyr,sram = &sdram_split; + }; + + /* + * Adjust sdram0 to reserve first 30KB for MCUBoot, and + * remaining 2KB for retained memory + */ + sdram_split: sdram_split@80008000 { + reg = <0x80008000 (0x2000000 - DT_SIZE_K(32))>; + }; + +}; diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/boards/nrf52840dk_nrf52840_ram_load.overlay b/samples/subsys/mgmt/mcumgr/smp_svr/boards/nrf52840dk_nrf52840_ram_load.overlay index 2b59fce7065f..946538c0d763 100644 --- a/samples/subsys/mgmt/mcumgr/smp_svr/boards/nrf52840dk_nrf52840_ram_load.overlay +++ b/samples/subsys/mgmt/mcumgr/smp_svr/boards/nrf52840dk_nrf52840_ram_load.overlay @@ -1,6 +1,35 @@ /delete-node/ &sram0; -#include "../sysbuild/nrf52840dk_nrf52840_mcuboot_ram_load.overlay" +/* + * Layout must match the nrf52840dk_nrf52840_ram_load overlay file within mcuboot + * application configuration directory + */ + +/ { + sram@2003FF00 { + compatible = "zephyr,memory-region", "mmio-sram"; + reg = <0x2003FF00 0x100>; + zephyr,memory-region = "RetainedMem"; + status = "okay"; + + retainedmem { + compatible = "zephyr,retained-ram"; + status = "okay"; + #address-cells = <1>; + #size-cells = <1>; + + boot_info0: boot_info@0 { + compatible = "zephyr,retention"; + status = "okay"; + reg = <0x0 0x100>; + }; + }; + }; + + chosen { + zephyr,bootloader-info = &boot_info0; + }; +}; / { chosen { diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/sample.yaml b/samples/subsys/mgmt/mcumgr/smp_svr/sample.yaml index 3d9cb6489cfb..229d103326f0 100644 --- a/samples/subsys/mgmt/mcumgr/smp_svr/sample.yaml +++ b/samples/subsys/mgmt/mcumgr/smp_svr/sample.yaml @@ -177,6 +177,7 @@ tests: - EXTRA_CONF_FILE="overlay-serial.conf" platform_allow: - nrf52840dk/nrf52840 + - mimxrt1050_evk/mimxrt1052/hyperflash integration_platforms: - nrf52840dk/nrf52840 sample.mcumgr.smp_svr.ram_load.serial.fs.shell: diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild/CMakeLists.txt b/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild/CMakeLists.txt index 7eb859ef4697..5dfdd0610eb9 100644 --- a/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild/CMakeLists.txt +++ b/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild/CMakeLists.txt @@ -1,9 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 -if("${FILE_SUFFIX}" STREQUAL "ram_load") - set(mcuboot_EXTRA_DTC_OVERLAY_FILE "${CMAKE_CURRENT_LIST_DIR}/nrf52840dk_nrf52840_mcuboot_ram_load.overlay" CACHE INTERNAL "" FORCE) -endif() - find_package(Sysbuild REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(sysbuild LANGUAGES) diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild/nrf52840dk_nrf52840_mcuboot_ram_load.overlay b/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild/nrf52840dk_nrf52840_mcuboot_ram_load.overlay deleted file mode 100644 index fbd19b0b74de..000000000000 --- a/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild/nrf52840dk_nrf52840_mcuboot_ram_load.overlay +++ /dev/null @@ -1,25 +0,0 @@ -/ { - sram@2003FC00 { - compatible = "zephyr,memory-region", "mmio-sram"; - reg = <0x2003FC00 DT_SIZE_K(1)>; - zephyr,memory-region = "RetainedMem"; - status = "okay"; - - retainedmem { - compatible = "zephyr,retained-ram"; - status = "okay"; - #address-cells = <1>; - #size-cells = <1>; - - boot_info0: boot_info@0 { - compatible = "zephyr,retention"; - status = "okay"; - reg = <0x0 0x100>; - }; - }; - }; - - chosen { - zephyr,bootloader-info = &boot_info0; - }; -}; diff --git a/soc/nxp/common/Kconfig.flexspi_xip b/soc/nxp/common/Kconfig.flexspi_xip index c36336ea2f33..e129569097dd 100644 --- a/soc/nxp/common/Kconfig.flexspi_xip +++ b/soc/nxp/common/Kconfig.flexspi_xip @@ -23,6 +23,7 @@ config FLASH_SIZE config FLASH_MCUX_FLEXSPI_XIP bool default $(DT_FLASH_PARENT_IS_FLEXSPI) + depends on !MCUBOOT_BOOTLOADER_MODE_RAM_LOAD select XIP help Allows REfor the soc to safely initialize the clocks for the diff --git a/west.yml b/west.yml index c005d3f727e8..b56d2e4894b7 100644 --- a/west.yml +++ b/west.yml @@ -303,7 +303,7 @@ manifest: groups: - crypto - name: mcuboot - revision: 06747985eee7c27d891f2529c58e18f4a84ea6a3 + revision: pull/123/head path: bootloader/mcuboot groups: - bootloader