Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ {
chosen {
nordic,pm-ext-flash = &mx25r64;
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/ {
chosen {
nordic,pm-ext-flash = &mx25r64;
};
};

/delete-node/ &boot_partition;
/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
/delete-node/ &storage_partition;

&cpuapp_rram {
reg = <0x0 DT_SIZE_K(1524)>;

partitions {
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x000000000 0x00014000>;
};

slot0_partition: partition@14000 {
label = "image-0";
reg = <0x000014000 0x0015A000>;
};

storage_partition: partition@16E000 {
label = "storage";
reg = < 0x16E000 0x9000 >;
};
};
};

&mx25r64 {
status = "okay";

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

slot1_partition: partition@0 {
label = "image-1";
reg = <0x000000000 0x0015A000>;
};
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
app:
address: 0x10200
region: flash_primary
size: 0xdfe00
mcuboot:
address: 0x0
region: flash_primary
size: 0x10000
mcuboot_pad:
address: 0x10000
region: flash_primary
size: 0x200
mcuboot_primary:
address: 0x10000
orig_span: &id001
- mcuboot_pad
- app
region: flash_primary
size: 0xe0000
span: *id001
mcuboot_primary_app:
address: 0x10200
orig_span: &id002
- app
region: flash_primary
size: 0xdfe00
span: *id002
settings_storage:
address: 0xf0000
region: flash_primary
size: 0x10000
mcuboot_primary_1:
address: 0x0
size: 0x40000
device: flash_ctrl
region: ram_flash
mcuboot_secondary:
address: 0x00000
size: 0xe0000
device: MX25R64
region: external_flash
mcuboot_secondary_1:
address: 0xe0000
size: 0x40000
device: MX25R64
region: external_flash
external_flash:
address: 0x120000
size: 0x6e0000
device: MX25R64
region: external_flash
pcd_sram:
address: 0x20000000
size: 0x2000
region: sram_primary
88 changes: 88 additions & 0 deletions samples/zephyr/subsys/mgmt/mcumgr/smp_svr/prj_nrf5340_bt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# 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
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y

# Some command handlers require a large stack.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2304
CONFIG_MAIN_STACK_SIZE=2176

# 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

# Allow for large Bluetooth data packets.
CONFIG_BT_L2CAP_TX_MTU=498
CONFIG_BT_BUF_ACL_RX_SIZE=502
CONFIG_BT_BUF_ACL_TX_SIZE=502
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251

# Enable the Bluetooth mcumgr transport (unauthenticated).
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL=y

# Enable the Shell mcumgr transport.
CONFIG_BASE64=y
CONFIG_CRC=y
CONFIG_SHELL=y
CONFIG_SHELL_BACKEND_SERIAL=y
CONFIG_MCUMGR_TRANSPORT_SHELL=y

# Enable the mcumgr Packet Reassembly feature over Bluetooth and its configuration dependencies.
# MCUmgr buffer size is optimized to fit one SMP packet divided into five Bluetooth Write Commands,
# transmitted with the maximum possible MTU value: 498 bytes.
CONFIG_MCUMGR_TRANSPORT_BT_REASSEMBLY=y
CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=2475
CONFIG_MCUMGR_GRP_OS_MCUMGR_PARAMS=y
CONFIG_MCUMGR_TRANSPORT_WORKQUEUE_STACK_SIZE=4608

# Enable the LittleFS file system.
CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_LITTLEFS=y

# Enable file system commands
CONFIG_MCUMGR_GRP_FS=y

# Enable the storage erase command.
CONFIG_MCUMGR_GRP_ZBASIC=y
CONFIG_MCUMGR_GRP_ZBASIC_STORAGE_ERASE=y

# Disable Bluetooth ping support
CONFIG_BT_CTLR_LE_PING=n

# Disable shell commands that are not needed
CONFIG_CLOCK_CONTROL_NRF_SHELL=n
CONFIG_DEVICE_SHELL=n
CONFIG_DEVMEM_SHELL=n
CONFIG_FLASH_SHELL=n
45 changes: 45 additions & 0 deletions samples/zephyr/subsys/mgmt/mcumgr/smp_svr/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,51 @@ common:
- ci_samples_zephyr_subsys_mgmt_mcumgr_smp_svr

tests:
sample.mcumgr.smp_svr.bt.nrf5340dk.ext_flash:
sysbuild: true
extra_args:
- FILE_SUFFIX=nrf5340_bt
platform_allow:
- nrf5340dk/nrf5340/cpuapp
integration_platforms:
- nrf5340dk/nrf5340/cpuapp
sample.mcumgr.smp_svr.bt.nrf54l15:
harness: bluetooth
tags: bluetooth
extra_args: EXTRA_CONF_FILE="overlay-bt.conf"
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
integration_platforms:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
sample.mcumgr.smp_svr.bt.nrf54l15dk.ext_flash:
extra_args:
- OVERLAY_CONFIG="overlay-bt.conf"
- DTC_OVERLAY_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.overlay"
- mcuboot_CONF_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.conf"
- mcuboot_EXTRA_DTC_OVERLAY_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.overlay"
- SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
- SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l05/cpuapp
integration_platforms:
- nrf54l15dk/nrf54l15/cpuapp
sample.mcumgr.smp_svr.bt.nrf54l15dk.ext_flash.pure_dts:
extra_args:
- OVERLAY_CONFIG="overlay-bt.conf"
- DTC_OVERLAY_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.overlay"
- mcuboot_CONF_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.conf"
- mcuboot_EXTRA_DTC_OVERLAY_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.overlay"
- SB_CONFIG_PARTITION_MANAGER=n
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l05/cpuapp
integration_platforms:
- nrf54l15dk/nrf54l15/cpuapp
sample.mcumgr.smp_svr.bt.nrf54h20dk:
sysbuild: true
extra_args:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_BOOT_MAX_IMG_SECTORS=240
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "../app_nrf5340_bt.overlay"

/ {
chosen {
zephyr,code-partition = &boot_partition;
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Enable MCUboot bootloader support
SB_CONFIG_BOOTLOADER_MCUBOOT=y
SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y
SB_CONFIG_NETCORE_HCI_IPC=y
SB_CONFIG_SECURE_BOOT_NETCORE=y
SB_CONFIG_NETCORE_APP_UPDATE=y
SB_CONFIG_MCUBOOT_NRF53_MULTI_IMAGE_UPDATE=y
SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ manifest:
# https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html
- name: zephyr
repo-path: sdk-zephyr
revision: b2b59e08ca03fe41222a3c3a6cad6fe11529b9c2
revision: cf180fe3d39cdedcc05ce6fe8e9ada09f325c730
import:
# In addition to the zephyr repository itself, NCS also
# imports the contents of zephyr/west.yml at the above
Expand Down
Loading