Skip to content

Commit

Permalink
sysbuild: sdp: Add SDP MSPI to cmake
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jaz1-nordic committed Nov 18, 2024
1 parent bb162fb commit 62f5714
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
3 changes: 3 additions & 0 deletions cmake/sysbuild/sdp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ if(SB_CONFIG_SDP)
set(snippet_name "sdp-gpio-icbmsg")
endif()
endif()
if(SB_CONFIG_SDP_MSPI)
set(snippet_name "sdp-mspi")
endif()

sdp_apply_snippets(${snippet_name})
set(snippet_name)
Expand Down
4 changes: 4 additions & 0 deletions sysbuild/Kconfig.sdp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
Expand All @@ -12,6 +13,9 @@ if SDP
config SDP_GPIO
bool "SDP GPIO application"

config SDP_MSPI
bool "SDP MSPI application"

if SDP_GPIO

choice SDP_GPIO_BACKEND
Expand Down
17 changes: 14 additions & 3 deletions sysbuild/sdp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,29 @@
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause

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

# Select the SDP application
if(SB_CONFIG_SDP_GPIO)
set(sdp_app_dir "${ZEPHYR_NRF_MODULE_DIR}/applications/sdp/gpio")
elseif(SB_CONFIG_SDP_MSPI)
set(sdp_app_dir "${ZEPHYR_NRF_MODULE_DIR}/applications/sdp/mspi")
else()
message(FATAL_ERROR "Unknown SDP application type")
endif()

# Include the SDP application in the build
ExternalZephyrProject_Add(
APPLICATION sdp
SOURCE_DIR ${ZEPHYR_NRF_MODULE_DIR}/applications/sdp/gpio
SOURCE_DIR ${sdp_app_dir}
BOARD ${board_target_flpr}
BOARD_REVISION ${BOARD_REVISION}
)
set(sdp_app_dir)
set(board_target_flpr)
endif()

0 comments on commit 62f5714

Please sign in to comment.