Skip to content

Commit 57d5b68

Browse files
committed
sysbuild: Pass SoftDevice Kconfig selection over
Selects the Kconfig in target images indicating what SoftDevice is selected Signed-off-by: Jamie McCrae <[email protected]>
1 parent f33fd44 commit 57d5b68

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

subsys/softdevice/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ config SOFTDEVICE_QOS_CHANNEL_SURVEY_REPORT
2424
if SOFTDEVICE
2525

2626
config SOFTDEVICE_S115
27-
bool
27+
bool "s115 SoftDevice"
2828
depends on SOC_SERIES_NRF54LX
2929
select SOFTDEVICE_PERIPHERAL
3030
select SOFTDEVICE_DATA_LENGTH_UPDATE

sysbuild/CMakeLists.txt

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,25 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake)
165165
endif()
166166
endif()
167167
endforeach()
168+
169+
if(SB_CONFIG_SOFTDEVICE_NONE)
170+
set_config_bool(${DEFAULT_IMAGE} CONFIG_SOFTDEVICE n)
171+
172+
if(NOT DEFINED SB_CONFIG_BM_BOOTLOADER_NONE AND NOT DEFINED SB_CONFIG_BM_FIRMWARE_LOADER_NONE)
173+
set_config_bool(${SB_CONFIG_BM_FIRMWARE_LOADER_IMAGE_NAME} CONFIG_SOFTDEVICE n)
174+
endif()
175+
else()
176+
foreach(option SOFTDEVICE_S115)
177+
if(SB_CONFIG_${option})
178+
set_config_bool(${DEFAULT_IMAGE} CONFIG_${option} y)
179+
180+
if(NOT DEFINED SB_CONFIG_BM_BOOTLOADER_NONE AND NOT DEFINED SB_CONFIG_BM_FIRMWARE_LOADER_NONE AND NOT DEFINED SB_CONFIG_BM_FIRMWARE_LOADER_UART_MCUMGR)
181+
set_config_bool(${SB_CONFIG_BM_FIRMWARE_LOADER_IMAGE_NAME} CONFIG_${option} y)
182+
endif()
183+
break()
184+
endif()
185+
endforeach()
186+
endif()
168187
endfunction()
169188

170189
function(${SYSBUILD_CURRENT_MODULE_NAME}_post_cmake)
@@ -174,12 +193,18 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_post_cmake)
174193

175194
cmake_parse_arguments(PRE_CMAKE "" "" "IMAGES" ${ARGN})
176195

177-
if(NOT SB_CONFIG_SOFTDEVICE_NONE)
178-
set(check_targets mcuboot;installer;${SB_CONFIG_BM_FIRMWARE_LOADER_IMAGE_NAME};${DEFAULT_IMAGE})
196+
if(NOT DEFINED SB_CONFIG_BM_BOOTLOADER_NONE)
197+
set(check_targets mcuboot;${DEFAULT_IMAGE})
179198
set(dependency_targets ${SB_CONFIG_SOFTDEVICE_FILE})
180-
set(production_targets mcuboot;${SB_CONFIG_BM_FIRMWARE_LOADER_IMAGE_NAME};${DEFAULT_IMAGE})
199+
set(production_targets mcuboot;${DEFAULT_IMAGE})
181200
set(production_files)
182201

202+
if(NOT DEFINED SB_CONFIG_BM_FIRMWARE_LOADER_NONE)
203+
list(APPEND check_targets installer)
204+
list(APPEND check_targets ${SB_CONFIG_BM_FIRMWARE_LOADER_IMAGE_NAME})
205+
list(APPEND production_targets ${SB_CONFIG_BM_FIRMWARE_LOADER_IMAGE_NAME})
206+
endif()
207+
183208
foreach(image ${check_targets})
184209
sysbuild_get(${image}_kernel_bin_name IMAGE ${image} VAR CONFIG_KERNEL_BIN_NAME KCONFIG)
185210
sysbuild_get(${image}_binary_dir IMAGE ${image} VAR APPLICATION_BINARY_DIR CACHE)

0 commit comments

Comments
 (0)