From 4ec2c9f64fc16649ffa6ffd435ec4740ece3cc4b Mon Sep 17 00:00:00 2001 From: Jakub Zymelka Date: Fri, 24 Jan 2025 10:48:39 +0100 Subject: [PATCH] sysbuild: sdp: Use Kconfig to specify FLPR image path Specifying the FLPR image path in Kconfig makes it easier to select the SDP FLPR core image and allows the use of external SDP images. Signed-off-by: Jakub Zymelka --- sysbuild/Kconfig.sdp | 7 +++++++ sysbuild/sdp.cmake | 12 +----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/sysbuild/Kconfig.sdp b/sysbuild/Kconfig.sdp index a84fbdc745f4..6d8137f44905 100644 --- a/sysbuild/Kconfig.sdp +++ b/sysbuild/Kconfig.sdp @@ -39,6 +39,13 @@ endchoice endif # SDP_GPIO +config SDP_IMAGE_PATH + string + default "${ZEPHYR_NRF_MODULE_DIR}/applications/sdp/gpio" if SDP_GPIO + default "${ZEPHYR_NRF_MODULE_DIR}/applications/sdp/mspi" if SDP_MSPI + help + Source directory of SDP image. + endif # SDP endmenu diff --git a/sysbuild/sdp.cmake b/sysbuild/sdp.cmake index 34d779ac1782..19966d44e5a6 100644 --- a/sysbuild/sdp.cmake +++ b/sysbuild/sdp.cmake @@ -9,22 +9,12 @@ if(SB_CONFIG_SDP) 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 ${sdp_app_dir} + SOURCE_DIR ${SB_CONFIG_SDP_IMAGE_PATH} BOARD ${board_target_flpr} BOARD_REVISION ${BOARD_REVISION} ) - set(sdp_app_dir) set(board_target_flpr) endif()