Skip to content

Commit aaa5c05

Browse files
committed
sysbuild/Kconfig: Added BM_APP_CAN_SETUP_FIRMWARE_LOADER_NAME
Added enabler for coherent setup of the BLE name from the application to the firmware loader using the settings subsystem with retention memory backend. Applied usage of this to configuration of the mcuboot_recovery_entry sample and the BLE firmware loader. Signed-off-by: Andrzej Puzdrowski <[email protected]>
1 parent 04d0c17 commit aaa5c05

File tree

5 files changed

+24
-11
lines changed

5 files changed

+24
-11
lines changed

applications/firmware_loader/ble_mcumgr/prj.conf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,3 @@ CONFIG_BLE_MCUMGR=y
4646

4747
CONFIG_LOG=y
4848
CONFIG_LOG_MODE_MINIMAL=y
49-
50-
CONFIG_RETAINED_MEM=y
51-
CONFIG_RETENTION=y
52-
CONFIG_SETTINGS=y
53-
CONFIG_SETTINGS_RETENTION=y
54-
#CONFIG_SETTINGS_RUNTIME=y
55-
CONFIG_NCS_BM_SETTINGS_BLUETOOTH_NAME=y

samples/boot/mcuboot_recovery_entry/prj.conf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,4 @@ CONFIG_BLE_CONN_PARAMS_MAX_CONN_INTERVAL=24
4848
CONFIG_BLE_CONN_PARAMS_SUP_TIMEOUT=20
4949
CONFIG_BLE_CONN_PARAMS_MAX_SUP_TIMEOUT_DEVIATION=20
5050

51-
CONFIG_SETTINGS=y
52-
CONFIG_SETTINGS_RETENTION=y
53-
CONFIG_SETTINGS_RUNTIME=y
5451
CONFIG_MCUMGR_GRP_SETTINGS=y
55-
CONFIG_NCS_BM_SETTINGS_BLUETOOTH_NAME=y
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
SB_CONFIG_BM_BOOTLOADER_MCUBOOT_FIRMWARE_LOADER_ENTRANCE_BOOT_MODE=y
2+
SB_CONFIG_BM_APP_CAN_SETUP_FIRMWARE_LOADER_NAME=y

sysbuild/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,21 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake)
153153
if(SB_CONFIG_BM_BOOTLOADER_MCUBOOT_FIRMWARE_LOADER_ENTRANCE_GPIO)
154154
set_config_bool(mcuboot CONFIG_BOOT_FIRMWARE_LOADER_ENTRANCE_GPIO y)
155155
endif()
156+
157+
if(SB_CONFIG_BM_APP_CAN_SETUP_FIRMWARE_LOADER_NAME)
158+
set_config_bool(firmware_loader CONFIG_RETAINED_MEM y)
159+
set_config_bool(firmware_loader CONFIG_RETENTION y)
160+
set_config_bool(firmware_loader CONFIG_SETTINGS y)
161+
set_config_bool(firmware_loader CONFIG_SETTINGS_RETENTION y)
162+
set_config_bool(firmware_loader CONFIG_NCS_BM_SETTINGS_BLUETOOTH_NAME y)
163+
164+
set_config_bool(${DEFAULT_IMAGE} CONFIG_RETAINED_MEM y)
165+
set_config_bool(${DEFAULT_IMAGE} CONFIG_RETENTION y)
166+
set_config_bool(${DEFAULT_IMAGE} CONFIG_SETTINGS y)
167+
set_config_bool(${DEFAULT_IMAGE} CONFIG_SETTINGS_RUNTIME y)
168+
set_config_bool(${DEFAULT_IMAGE} CONFIG_SETTINGS_RETENTION y)
169+
set_config_bool(${DEFAULT_IMAGE} CONFIG_NCS_BM_SETTINGS_BLUETOOTH_NAME y)
170+
endif()
156171
endif()
157172

158173
# Use BM-supplied bootloader image configuration file

sysbuild/Kconfig.bm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ config BM_BOOTLOADER_MCUBOOT_FIRMWARE_LOADER_ENTRANCE_BOOT_MODE
7979

8080
endmenu
8181

82+
config BM_APP_CAN_SETUP_FIRMWARE_LOADER_NAME
83+
bool "Remote setup firmware loader BLE Advertising Name"
84+
depends on !BM_FIRMWARE_LOADER_NONE
85+
help
86+
If enable, the application and the firmware loader will be configured
87+
for supporting setup of the firmware loader BLE name using the settings retention
88+
memory backend. The settings key for writing the name is `bluetooth_name/name`.
89+
8290
choice BM_BOOTLOADER_MCUBOOT_IMG_HASH_ALG
8391
prompt "Hashing algorithm"
8492
default BM_BOOT_IMG_HASH_ALG_PURE if BM_BOOTLOADER_MCUBOOT_SIGNATURE_TYPE_ED25519 && SOC_SERIES_NRF54LX

0 commit comments

Comments
 (0)