Skip to content

Commit 7c543a6

Browse files
committed
sysbuild: sdp: Add SDP MSPI to cmake
Add cmake files to be able to include the SDP MSPI application in solutions where SDP MSPI is required. Signed-off-by: Jakub Zymelka <[email protected]>
1 parent 607c6be commit 7c543a6

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

cmake/sysbuild/sdp.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ if(SB_CONFIG_SDP)
1818
set(snippet_name "sdp-gpio-icbmsg")
1919
endif()
2020
endif()
21+
if(SB_CONFIG_SDP_MSPI)
22+
set(snippet_name "sdp-mspi")
23+
endif()
2124

2225
sdp_apply_snippets(${snippet_name})
2326
set(snippet_name)

sysbuild/Kconfig.sdp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ if SDP
1212
config SDP_GPIO
1313
bool "SDP GPIO application"
1414

15+
config SDP_MSPI
16+
bool "SDP MSPI application"
17+
1518
if SDP_GPIO
1619

1720
choice SDP_GPIO_BACKEND

sysbuild/sdp.cmake

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,29 @@
22
#
33
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
44

5-
# If it is enabled, include the SDP GPIO application in the build
6-
if(SB_CONFIG_SDP_GPIO)
5+
if(SB_CONFIG_SDP)
76
# Extract SoC name from related variables
87
string(REPLACE "/" ";" split_board_qualifiers "${BOARD_QUALIFIERS}")
98
list(GET split_board_qualifiers 1 target_soc)
109
set(board_target_flpr "${BOARD}/${target_soc}/cpuflpr")
1110
set(target_soc)
1211

12+
# Select the SDP application
13+
if(SB_CONFIG_SDP_GPIO)
14+
set(sdp_app_dir "${ZEPHYR_NRF_MODULE_DIR}/applications/sdp/gpio")
15+
elseif(SB_CONFIG_SDP_MSPI)
16+
set(sdp_app_dir "${ZEPHYR_NRF_MODULE_DIR}/applications/sdp/mspi")
17+
else()
18+
message(FATAL_ERROR "Unknown SDP application type")
19+
endif()
20+
21+
# Include the SDP application in the build
1322
ExternalZephyrProject_Add(
1423
APPLICATION sdp
15-
SOURCE_DIR ${ZEPHYR_NRF_MODULE_DIR}/applications/sdp/gpio
24+
SOURCE_DIR ${sdp_app_dir}
1625
BOARD ${board_target_flpr}
1726
BOARD_REVISION ${BOARD_REVISION}
1827
)
28+
set(sdp_app_dir)
29+
set(board_target_flpr)
1930
endif()

0 commit comments

Comments
 (0)