samples: mgmt: mcumgr: smp_svr: Add RAM load configuration
Adds configuration for booting this sample in RAM load mode on nrf52840dk Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
parent
646f116cca
commit
525f2b9153
|
@ -0,0 +1 @@
|
|||
CONFIG_RETAINED_MEM_NRF_GPREGRET=n
|
|
@ -0,0 +1,17 @@
|
|||
/delete-node/ &sram0;
|
||||
|
||||
#include "../sysbuild/nrf52840dk_nrf52840_mcuboot_ram_load.overlay"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,flash = &flash0;
|
||||
/delete-property/ zephyr,code-partition;
|
||||
};
|
||||
|
||||
soc {
|
||||
sram0: memory@20006000 {
|
||||
compatible = "mmio-sram";
|
||||
reg = <0x20006000 DT_SIZE_K(200)>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -0,0 +1,48 @@
|
|||
# Enable MCUmgr and dependencies.
|
||||
CONFIG_NET_BUF=y
|
||||
CONFIG_ZCBOR=y
|
||||
CONFIG_CRC=y
|
||||
CONFIG_MCUMGR=y
|
||||
CONFIG_STREAM_FLASH=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
# Some command handlers require a large stack.
|
||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2304
|
||||
CONFIG_MAIN_STACK_SIZE=2048
|
||||
|
||||
# Ensure an MCUboot-compatible binary is generated.
|
||||
CONFIG_BOOTLOADER_MCUBOOT=y
|
||||
|
||||
# Enable flash operations.
|
||||
CONFIG_FLASH=y
|
||||
|
||||
# Required by the `taskstat` command.
|
||||
CONFIG_THREAD_MONITOR=y
|
||||
|
||||
# Support for taskstat command
|
||||
CONFIG_MCUMGR_GRP_OS_TASKSTAT=y
|
||||
|
||||
# Enable statistics and statistic names.
|
||||
CONFIG_STATS=y
|
||||
CONFIG_STATS_NAMES=y
|
||||
|
||||
# Enable most core commands.
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_IMG_MANAGER=y
|
||||
CONFIG_MCUMGR_GRP_IMG=y
|
||||
CONFIG_MCUMGR_GRP_OS=y
|
||||
CONFIG_MCUMGR_GRP_STAT=y
|
||||
|
||||
# Enable logging
|
||||
CONFIG_LOG=y
|
||||
CONFIG_MCUBOOT_UTIL_LOG_LEVEL_WRN=y
|
||||
|
||||
# Disable debug logging
|
||||
CONFIG_LOG_MAX_LEVEL=3
|
||||
|
||||
# Enable retained memory and retention
|
||||
CONFIG_RETAINED_MEM=y
|
||||
CONFIG_RETENTION=y
|
||||
CONFIG_RETAINED_MEM_ZEPHYR_RAM=y
|
||||
CONFIG_RETENTION_BOOTLOADER_INFO=y
|
||||
CONFIG_RETENTION_BOOTLOADER_INFO_TYPE_MCUBOOT=y
|
|
@ -158,3 +158,26 @@ tests:
|
|||
- mg100
|
||||
integration_platforms:
|
||||
- nrf52840dk/nrf52840
|
||||
sample.mcumgr.smp_svr.ram_load:
|
||||
sysbuild: true
|
||||
extra_args: FILE_SUFFIX="ram_load"
|
||||
platform_allow:
|
||||
- nrf52840dk/nrf52840
|
||||
integration_platforms:
|
||||
- nrf52840dk/nrf52840
|
||||
sample.mcumgr.smp_svr.ram_load.serial:
|
||||
sysbuild: true
|
||||
extra_args: FILE_SUFFIX="ram_load"
|
||||
EXTRA_CONF_FILE="overlay-serial.conf"
|
||||
platform_allow:
|
||||
- nrf52840dk/nrf52840
|
||||
integration_platforms:
|
||||
- nrf52840dk/nrf52840
|
||||
sample.mcumgr.smp_svr.ram_load.serial.fs.shell:
|
||||
sysbuild: true
|
||||
extra_args: FILE_SUFFIX="ram_load"
|
||||
EXTRA_CONF_FILE="overlay-serial.conf;overlay-fs.conf;overlay-shell.conf"
|
||||
platform_allow:
|
||||
- nrf52840dk/nrf52840
|
||||
integration_platforms:
|
||||
- nrf52840dk/nrf52840
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# 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)
|
|
@ -0,0 +1,9 @@
|
|||
CONFIG_SRAM_SIZE=30
|
||||
CONFIG_RETAINED_MEM=y
|
||||
CONFIG_RETENTION=y
|
||||
CONFIG_RETAINED_MEM_ZEPHYR_RAM=y
|
||||
CONFIG_BOOT_SHARE_DATA=y
|
||||
CONFIG_BOOT_SHARE_DATA_BOOTINFO=y
|
||||
CONFIG_BOOT_SHARE_BACKEND_RETENTION=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_MAP=y
|
|
@ -0,0 +1,25 @@
|
|||
/ {
|
||||
sram@2003F000 {
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x2003F000 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;
|
||||
};
|
||||
};
|
|
@ -0,0 +1,3 @@
|
|||
# Enable MCUboot bootloader support and use RAM load mode
|
||||
SB_CONFIG_BOOTLOADER_MCUBOOT=y
|
||||
SB_CONFIG_MCUBOOT_MODE_RAM_LOAD=y
|
Loading…
Reference in New Issue