From 385d27c37ee65942062e4f12b0c1b9fc43e2fa9a Mon Sep 17 00:00:00 2001 From: Marcin Szymczyk Date: Wed, 10 Apr 2024 12:34:07 +0200 Subject: [PATCH] soc: nordic: add `vpr_launcher` in sysbuild `SB_CONFIG_VPR_LAUNCHER` can now be used in building a VPR target, to enable automatic building of image that will launch the VPR. Signed-off-by: Marcin Szymczyk --- soc/nordic/Kconfig.sysbuild | 4 ++++ soc/nordic/common/vpr/Kconfig.sysbuild | 15 +++++++++++++++ soc/nordic/sysbuild.cmake | 22 ++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 soc/nordic/Kconfig.sysbuild create mode 100644 soc/nordic/common/vpr/Kconfig.sysbuild create mode 100644 soc/nordic/sysbuild.cmake diff --git a/soc/nordic/Kconfig.sysbuild b/soc/nordic/Kconfig.sysbuild new file mode 100644 index 000000000000000..f146dac821e1005 --- /dev/null +++ b/soc/nordic/Kconfig.sysbuild @@ -0,0 +1,4 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +rsource "common/vpr/Kconfig.sysbuild" diff --git a/soc/nordic/common/vpr/Kconfig.sysbuild b/soc/nordic/common/vpr/Kconfig.sysbuild new file mode 100644 index 000000000000000..8704e4edb7bf674 --- /dev/null +++ b/soc/nordic/common/vpr/Kconfig.sysbuild @@ -0,0 +1,15 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +menuconfig VPR_LAUNCHER + bool "VPR launcher" + depends on SOC_SERIES_NRF54HX + help + Include VPR launcher hex for application core. + +if VPR_LAUNCHER + +config VPR_LAUNCHER_XIP + bool "Use XIP snippet and skip copying to RAM." + +endif diff --git a/soc/nordic/sysbuild.cmake b/soc/nordic/sysbuild.cmake new file mode 100644 index 000000000000000..fceda63a82dd4da --- /dev/null +++ b/soc/nordic/sysbuild.cmake @@ -0,0 +1,22 @@ +# Copyright (c) 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +if(SB_CONFIG_VPR_LAUNCHER) + set(launcher_core "cpuapp") + string(REPLACE "/" ";" launcher_quals ${BOARD_QUALIFIERS}) + list(GET launcher_quals 1 launcher_soc) + string(CONCAT launcher_board ${BOARD} "/" ${launcher_soc} "/" ${launcher_core}) + + set(image vpr_launcher) + ExternalZephyrProject_Add( + APPLICATION ${image} + SOURCE_DIR ${ZEPHYR_BASE}/samples/basic/minimal + BOARD ${launcher_board} + ) + + if(SB_CONFIG_VPR_LAUNCHER_XIP) + sysbuild_cache_set(VAR ${image}_SNIPPET APPEND REMOVE_DUPLICATES nordic-ppr-xip) + else() + sysbuild_cache_set(VAR ${image}_SNIPPET APPEND REMOVE_DUPLICATES nordic-ppr) + endif() +endif()