diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/app_nrf5340_bt.overlay b/samples/subsys/mgmt/mcumgr/smp_svr/app_nrf5340_bt.overlay deleted file mode 100644 index fcc2e240fd9..00000000000 --- a/samples/subsys/mgmt/mcumgr/smp_svr/app_nrf5340_bt.overlay +++ /dev/null @@ -1,5 +0,0 @@ -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.overlay b/samples/subsys/mgmt/mcumgr/smp_svr/boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.overlay deleted file mode 100644 index c8040e40ffd..00000000000 --- a/samples/subsys/mgmt/mcumgr/smp_svr/boards/nrf54l15dk_nrf54l15_cpuapp_ext_flash.overlay +++ /dev/null @@ -1,46 +0,0 @@ -/ { - 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>; - }; - }; -}; diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/pm_static_nrf5340_bt.yml b/samples/subsys/mgmt/mcumgr/smp_svr/pm_static_nrf5340_bt.yml deleted file mode 100644 index 7a48d51ec33..00000000000 --- a/samples/subsys/mgmt/mcumgr/smp_svr/pm_static_nrf5340_bt.yml +++ /dev/null @@ -1,55 +0,0 @@ -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 diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/prj_nrf5340_bt.conf b/samples/subsys/mgmt/mcumgr/smp_svr/prj_nrf5340_bt.conf deleted file mode 100644 index cb53d3e6beb..00000000000 --- a/samples/subsys/mgmt/mcumgr/smp_svr/prj_nrf5340_bt.conf +++ /dev/null @@ -1,88 +0,0 @@ -# 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 diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/sample.yaml b/samples/subsys/mgmt/mcumgr/smp_svr/sample.yaml index aef16825a75..fd6194cdc4f 100644 --- a/samples/subsys/mgmt/mcumgr/smp_svr/sample.yaml +++ b/samples/subsys/mgmt/mcumgr/smp_svr/sample.yaml @@ -14,12 +14,9 @@ tests: - nrf52840dk/nrf52840 - pinnacle_100_dvk - mg100 - - nrf54l15dk/nrf54l15/cpuapp - - nrf54l15dk/nrf54l10/cpuapp integration_platforms: - nrf52dk/nrf52832 - nrf52840dk/nrf52840 - - nrf54l15dk/nrf54l15/cpuapp sample.mcumgr.smp_svr.bt_static_svc: harness: bluetooth tags: bluetooth @@ -173,33 +170,6 @@ tests: - mg100 integration_platforms: - nrf52840dk/nrf52840 - 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.ram_load: extra_args: FILE_SUFFIX="ram_load" platform_allow: @@ -222,11 +192,3 @@ tests: - nrf52840dk/nrf52840 integration_platforms: - nrf52840dk/nrf52840 - 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 diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild.cmake b/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild.cmake deleted file mode 100644 index f0a9f06df84..00000000000 --- a/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: Apache-2.0 -# - -if(FILE_SUFFIX STREQUAL "nrf5340_bt") - if(SB_CONFIG_SOC_NRF5340_CPUAPP) - # nRF5340 with Bluetooth configuration, add partition manager configuration to MCUboot image - list(APPEND mcuboot_EXTRA_DTC_OVERLAY_FILE ${CMAKE_CURRENT_LIST_DIR}/app_nrf5340_bt.overlay) - list(REMOVE_DUPLICATES mcuboot_EXTRA_DTC_OVERLAY_FILE) - set(mcuboot_EXTRA_DTC_OVERLAY_FILE ${mcuboot_EXTRA_DTC_OVERLAY_FILE} CACHE INTERNAL "" FORCE) - else() - message(FATAL_ERROR "File suffix 'nrf5340_bt' can only be used on an nRF5340 CPUAPP board target") - endif() -endif() diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild/mcuboot_nrf5340_bt.conf b/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild/mcuboot_nrf5340_bt.conf deleted file mode 100644 index 4ebbf98cf20..00000000000 --- a/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild/mcuboot_nrf5340_bt.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BOOT_MAX_IMG_SECTORS=240 diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild_nrf5340_bt.conf b/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild_nrf5340_bt.conf deleted file mode 100644 index 16bcac179e8..00000000000 --- a/samples/subsys/mgmt/mcumgr/smp_svr/sysbuild_nrf5340_bt.conf +++ /dev/null @@ -1,8 +0,0 @@ -# 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 diff --git a/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt_state.c b/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt_state.c index 4ddd741851e..984ed7fea27 100644 --- a/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt_state.c +++ b/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt_state.c @@ -435,7 +435,10 @@ static bool img_mgmt_state_encode_slot(struct smp_streamer *ctxt, uint32_t slot, uint32_t flags; char vers_str[IMG_MGMT_VER_MAX_STR_LEN]; uint8_t hash[IMAGE_SHA_LEN]; - struct zcbor_string zhash = { .value = hash, .len = IMAGE_SHA_LEN}; + struct zcbor_string zhash = { + .value = hash, + .len = IMAGE_SHA_LEN, + }; struct image_version ver; bool ok; int rc = img_mgmt_read_info(slot, &ver, hash, &flags);