From 2ceaea23f866f75f7aec12e5a1b1f3f5933d8b3b Mon Sep 17 00:00:00 2001 From: Jakub Zymelka Date: Mon, 18 Nov 2024 10:38:21 +0100 Subject: [PATCH] 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 --- cmake/sysbuild/sdp.cmake | 3 +++ sysbuild/Kconfig.sdp | 4 ++++ sysbuild/sdp.cmake | 17 ++++++++++++++--- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/cmake/sysbuild/sdp.cmake b/cmake/sysbuild/sdp.cmake index f440b687796b..3dc1d8c0f734 100644 --- a/cmake/sysbuild/sdp.cmake +++ b/cmake/sysbuild/sdp.cmake @@ -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) diff --git a/sysbuild/Kconfig.sdp b/sysbuild/Kconfig.sdp index 7529d937e07f..6d93b758155e 100644 --- a/sysbuild/Kconfig.sdp +++ b/sysbuild/Kconfig.sdp @@ -1,3 +1,4 @@ + # Copyright (c) 2024 Nordic Semiconductor # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause @@ -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 diff --git a/sysbuild/sdp.cmake b/sysbuild/sdp.cmake index 2167bfac5655..34d779ac1782 100644 --- a/sysbuild/sdp.cmake +++ b/sysbuild/sdp.cmake @@ -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()