Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smp svr for nrf54l15 #14475

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 1 addition & 1 deletion drivers/mpsl/flash_sync/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

if SOC_FLASH_NRF
if SOC_FLASH_NRF || SOC_FLASH_NRF_RRAM

choice SOC_FLASH_NRF_RADIO_SYNC_CHOICE
prompt "Nordic nRFx flash driver synchronization"
Expand Down
9 changes: 9 additions & 0 deletions samples/smp_svr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.20.0)

# Standard Zephyr application boilerplate.
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(smp_svr)

set(smp_srv_dir $ENV{ZEPHYR_BASE}/samples/subsys/mgmt/mcumgr/smp_svr)
target_sources(app PRIVATE ${smp_srv_dir}/src/main.c)
target_sources(app PRIVATE ${smp_srv_dir}/src/bluetooth.c)
90 changes: 90 additions & 0 deletions samples/smp_svr/boards/nrf54l15pdk_nrf54l15_cpuapp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y

# 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_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL=y

# Enable the Shell mcumgr transport.
CONFIG_BASE64=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
# Enable shell commands.
CONFIG_MCUMGR_GRP_SHELL=y

CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# 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

# 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_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
10 changes: 10 additions & 0 deletions samples/smp_svr/boards/nrf54l15pdk_nrf54l15_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/{
chosen{
zephyr,uart-mcumgr = &uart30;
zephyr,shell-uart = &uart30;
};
};

&uart30{
status = "okay";
};
2 changes: 2 additions & 0 deletions samples/smp_svr/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ensure an MCUboot-compatible binary is generated.
CONFIG_BOOTLOADER_MCUBOOT=y
15 changes: 15 additions & 0 deletions samples/smp_svr/sample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
sample:
name: smp_svr example
tests:
sample.smp_svr:
tags: introduction
platform_allow: >
nrf54l15pdk_nrf54l15_cpuapp
harness: console
harness_config:
type: multi_line
regex:
- ".*smp_sample.*"
integration_platforms:
- nrf54l15pdk_nrf54l15_cpuapp
# Build integration regression protection.

Check warning on line 15 in samples/smp_svr/sample.yaml

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

YAMLLint (comments-indentation)

samples/smp_svr/sample.yaml:15 comment not indented like content
1 change: 1 addition & 0 deletions samples/smp_svr/sysbuild.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SB_CONFIG_BOOTLOADER_MCUBOOT=y
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ manifest:
# https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html
- name: zephyr
repo-path: sdk-zephyr
revision: ecb16c791d10fdab4a41bd3dc790610dff5e9520
revision: pull/1580/head
import:
# In addition to the zephyr repository itself, NCS also
# imports the contents of zephyr/west.yml at the above
Expand Down
Loading