Skip to content

Commit 7b45235

Browse files
danieldegrassefabiobaltieri
authored andcommitted
samples: subsys: mcumgr: rework ram load support for multiple boards
MCUMgr ram load support was hardcoding the overlay file for the nrf52840dk. To make this support generic, move the _ram_load overlay file to the MCUBoot repository, as part of the mcuboot application. Signed-off-by: Daniel DeGrasse <[email protected]>
1 parent 1bc008d commit 7b45235

File tree

3 files changed

+35
-38
lines changed

3 files changed

+35
-38
lines changed

samples/subsys/mgmt/mcumgr/smp_svr/boards/nrf52840dk_nrf52840_ram_load.overlay

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
11
/delete-node/ &sram0;
22

3-
#include "../sysbuild/nrf52840dk_nrf52840_mcuboot_ram_load.overlay"
3+
/*
4+
* Layout must match the nrf52840dk_nrf52840_ram_load overlay file within mcuboot
5+
* application configuration directory
6+
*/
7+
8+
&gpregret1 {
9+
/delete-node/ boot_mode@0;
10+
};
11+
12+
/ {
13+
sram@2003FC00 {
14+
compatible = "zephyr,memory-region", "mmio-sram";
15+
reg = <0x2003FC00 DT_SIZE_K(1)>;
16+
zephyr,memory-region = "RetainedMem";
17+
status = "okay";
18+
19+
retainedmem {
20+
compatible = "zephyr,retained-ram";
21+
status = "okay";
22+
#address-cells = <1>;
23+
#size-cells = <1>;
24+
25+
boot_info0: boot_info@0 {
26+
compatible = "zephyr,retention";
27+
status = "okay";
28+
reg = <0x0 0x100>;
29+
};
30+
};
31+
};
32+
33+
chosen {
34+
/delete-property/ zephyr,boot-mode;
35+
zephyr,bootloader-info = &boot_info0;
36+
};
37+
};
438

539
/ {
640
chosen {
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3-
if("${FILE_SUFFIX}" STREQUAL "ram_load")
4-
set(mcuboot_EXTRA_DTC_OVERLAY_FILE "${CMAKE_CURRENT_LIST_DIR}/nrf52840dk_nrf52840_mcuboot_ram_load.overlay" CACHE INTERNAL "" FORCE)
5-
endif()
6-
73
find_package(Sysbuild REQUIRED HINTS $ENV{ZEPHYR_BASE})
84

95
project(sysbuild LANGUAGES)

samples/subsys/mgmt/mcumgr/smp_svr/sysbuild/nrf52840dk_nrf52840_mcuboot_ram_load.overlay

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)