From 4235efc7bd4e5b420cd960237e24ee7107627d19 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Mon, 18 Mar 2024 15:39:54 +0100 Subject: [PATCH] samples|tests several: Support using nrf5340bsim hwmv2 names For all samples which handle the nrf5340bsim in some special way (for example in sysbuild files, or by checking what samples are supported) handle also building with the hwmv2 names. Also, let's fix the cmake info message in these respective samples which tells the user which board target is used for which part of the app. Signed-off-by: Alberto Escolar Piedras --- samples/bluetooth/broadcast_audio_sink/Kconfig.sysbuild | 1 + samples/bluetooth/broadcast_audio_source/Kconfig.sysbuild | 1 + samples/bluetooth/public_broadcast_sink/Kconfig.sysbuild | 1 + samples/bluetooth/public_broadcast_source/Kconfig.sysbuild | 1 + samples/bluetooth/unicast_audio_client/Kconfig.sysbuild | 1 + samples/bluetooth/unicast_audio_server/Kconfig.sysbuild | 1 + samples/boards/nrf/nrf53_sync_rtc/CMakeLists.txt | 3 ++- samples/boards/nrf/nrf53_sync_rtc/Kconfig.sysbuild | 1 + samples/boards/nrf/nrf53_sync_rtc/net/CMakeLists.txt | 5 +++-- samples/drivers/mbox/CMakeLists.txt | 3 ++- samples/drivers/mbox/Kconfig.sysbuild | 1 + samples/drivers/mbox/remote/CMakeLists.txt | 3 ++- samples/subsys/logging/multidomain/CMakeLists.txt | 3 ++- samples/subsys/logging/multidomain/Kconfig.sysbuild | 1 + .../audio_samples/broadcast_audio_sink/Kconfig.sysbuild | 1 + .../audio_samples/unicast_audio_client/Kconfig.sysbuild | 1 + tests/bsim/bluetooth/ll/bis/Kconfig.sysbuild | 2 ++ tests/bsim/bluetooth/ll/cis/Kconfig.sysbuild | 2 ++ tests/bsim/bluetooth/ll/conn/Kconfig.sysbuild | 2 ++ 19 files changed, 28 insertions(+), 6 deletions(-) diff --git a/samples/bluetooth/broadcast_audio_sink/Kconfig.sysbuild b/samples/bluetooth/broadcast_audio_sink/Kconfig.sysbuild index d609fd0ec85..a85b5ab2bb0 100644 --- a/samples/bluetooth/broadcast_audio_sink/Kconfig.sysbuild +++ b/samples/bluetooth/broadcast_audio_sink/Kconfig.sysbuild @@ -8,6 +8,7 @@ config NET_CORE_BOARD default "nrf5340dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340dk" default "nrf5340_audio_dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340_audio_dk" default "nrf5340bsim_nrf5340_cpunet" if "$(BOARD)" = "nrf5340bsim_nrf5340_cpuapp" + default "nrf5340bsim/nrf5340/cpunet" if "$(BOARD)$(BOARD_IDENTIFIER)" = "nrf5340bsim/nrf5340/cpuapp" config NET_CORE_IMAGE_HCI_IPC bool "HCI IPC image on network core" diff --git a/samples/bluetooth/broadcast_audio_source/Kconfig.sysbuild b/samples/bluetooth/broadcast_audio_source/Kconfig.sysbuild index d609fd0ec85..a85b5ab2bb0 100644 --- a/samples/bluetooth/broadcast_audio_source/Kconfig.sysbuild +++ b/samples/bluetooth/broadcast_audio_source/Kconfig.sysbuild @@ -8,6 +8,7 @@ config NET_CORE_BOARD default "nrf5340dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340dk" default "nrf5340_audio_dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340_audio_dk" default "nrf5340bsim_nrf5340_cpunet" if "$(BOARD)" = "nrf5340bsim_nrf5340_cpuapp" + default "nrf5340bsim/nrf5340/cpunet" if "$(BOARD)$(BOARD_IDENTIFIER)" = "nrf5340bsim/nrf5340/cpuapp" config NET_CORE_IMAGE_HCI_IPC bool "HCI IPC image on network core" diff --git a/samples/bluetooth/public_broadcast_sink/Kconfig.sysbuild b/samples/bluetooth/public_broadcast_sink/Kconfig.sysbuild index d609fd0ec85..a85b5ab2bb0 100644 --- a/samples/bluetooth/public_broadcast_sink/Kconfig.sysbuild +++ b/samples/bluetooth/public_broadcast_sink/Kconfig.sysbuild @@ -8,6 +8,7 @@ config NET_CORE_BOARD default "nrf5340dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340dk" default "nrf5340_audio_dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340_audio_dk" default "nrf5340bsim_nrf5340_cpunet" if "$(BOARD)" = "nrf5340bsim_nrf5340_cpuapp" + default "nrf5340bsim/nrf5340/cpunet" if "$(BOARD)$(BOARD_IDENTIFIER)" = "nrf5340bsim/nrf5340/cpuapp" config NET_CORE_IMAGE_HCI_IPC bool "HCI IPC image on network core" diff --git a/samples/bluetooth/public_broadcast_source/Kconfig.sysbuild b/samples/bluetooth/public_broadcast_source/Kconfig.sysbuild index d609fd0ec85..e66e696d984 100644 --- a/samples/bluetooth/public_broadcast_source/Kconfig.sysbuild +++ b/samples/bluetooth/public_broadcast_source/Kconfig.sysbuild @@ -8,6 +8,7 @@ config NET_CORE_BOARD default "nrf5340dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340dk" default "nrf5340_audio_dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340_audio_dk" default "nrf5340bsim_nrf5340_cpunet" if "$(BOARD)" = "nrf5340bsim_nrf5340_cpuapp" + default "nrf5340bsim/nrf5340/cpunet" if $(BOARD)$(BOARD_IDENTIFIER) = "nrf5340bsim/nrf5340/cpuapp" config NET_CORE_IMAGE_HCI_IPC bool "HCI IPC image on network core" diff --git a/samples/bluetooth/unicast_audio_client/Kconfig.sysbuild b/samples/bluetooth/unicast_audio_client/Kconfig.sysbuild index d609fd0ec85..e66e696d984 100644 --- a/samples/bluetooth/unicast_audio_client/Kconfig.sysbuild +++ b/samples/bluetooth/unicast_audio_client/Kconfig.sysbuild @@ -8,6 +8,7 @@ config NET_CORE_BOARD default "nrf5340dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340dk" default "nrf5340_audio_dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340_audio_dk" default "nrf5340bsim_nrf5340_cpunet" if "$(BOARD)" = "nrf5340bsim_nrf5340_cpuapp" + default "nrf5340bsim/nrf5340/cpunet" if $(BOARD)$(BOARD_IDENTIFIER) = "nrf5340bsim/nrf5340/cpuapp" config NET_CORE_IMAGE_HCI_IPC bool "HCI IPC image on network core" diff --git a/samples/bluetooth/unicast_audio_server/Kconfig.sysbuild b/samples/bluetooth/unicast_audio_server/Kconfig.sysbuild index d609fd0ec85..e66e696d984 100644 --- a/samples/bluetooth/unicast_audio_server/Kconfig.sysbuild +++ b/samples/bluetooth/unicast_audio_server/Kconfig.sysbuild @@ -8,6 +8,7 @@ config NET_CORE_BOARD default "nrf5340dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340dk" default "nrf5340_audio_dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340_audio_dk" default "nrf5340bsim_nrf5340_cpunet" if "$(BOARD)" = "nrf5340bsim_nrf5340_cpuapp" + default "nrf5340bsim/nrf5340/cpunet" if $(BOARD)$(BOARD_IDENTIFIER) = "nrf5340bsim/nrf5340/cpuapp" config NET_CORE_IMAGE_HCI_IPC bool "HCI IPC image on network core" diff --git a/samples/boards/nrf/nrf53_sync_rtc/CMakeLists.txt b/samples/boards/nrf/nrf53_sync_rtc/CMakeLists.txt index a09354a9e05..179ceeb5467 100644 --- a/samples/boards/nrf/nrf53_sync_rtc/CMakeLists.txt +++ b/samples/boards/nrf/nrf53_sync_rtc/CMakeLists.txt @@ -8,8 +8,9 @@ cmake_minimum_required(VERSION 3.20.0) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) if(("${BOARD}" STREQUAL "nrf5340dk") OR + ("${BOARD}${BOARD_IDENTIFIER}" STREQUAL "nrf5340bsim/nrf5340/cpuapp") OR ("${BOARD}" STREQUAL "nrf5340bsim_nrf5340_cpuapp")) - message(INFO " ${BOARD} used for Application Core") + message(INFO " ${BOARD}${BOARD_IDENTIFIER} used for Application Core") else() message(FATAL_ERROR "${BOARD} is not supported for this sample") endif() diff --git a/samples/boards/nrf/nrf53_sync_rtc/Kconfig.sysbuild b/samples/boards/nrf/nrf53_sync_rtc/Kconfig.sysbuild index e6d2ccd9930..34b23ce2113 100644 --- a/samples/boards/nrf/nrf53_sync_rtc/Kconfig.sysbuild +++ b/samples/boards/nrf/nrf53_sync_rtc/Kconfig.sysbuild @@ -8,3 +8,4 @@ config NET_CORE_BOARD string default "nrf5340dk/nrf5340/cpunet" if $(BOARD) = "nrf5340dk" default "nrf5340bsim_nrf5340_cpunet" if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp" + default "nrf5340bsim/nrf5340/cpunet" if $(BOARD)$(BOARD_IDENTIFIER) = "nrf5340bsim/nrf5340/cpuapp" diff --git a/samples/boards/nrf/nrf53_sync_rtc/net/CMakeLists.txt b/samples/boards/nrf/nrf53_sync_rtc/net/CMakeLists.txt index 341d961d8f0..b9335266efd 100644 --- a/samples/boards/nrf/nrf53_sync_rtc/net/CMakeLists.txt +++ b/samples/boards/nrf/nrf53_sync_rtc/net/CMakeLists.txt @@ -8,8 +8,9 @@ cmake_minimum_required(VERSION 3.20.0) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) if(("${BOARD}" STREQUAL "nrf5340dk") OR - ("${BOARD}" STREQUAL "nrf5340bsim_nrf5340_cpunet")) - message(INFO " ${BOARD} used for Network Core") + ("${BOARD}" STREQUAL "nrf5340bsim_nrf5340_cpunet") OR + ("${BOARD}" STREQUAL "nrf5340bsim")) + message(INFO " ${BOARD}${BOARD_IDENTIFIER} used for Network Core") else() message(FATAL_ERROR "${BOARD} is not supported for this sample") endif() diff --git a/samples/drivers/mbox/CMakeLists.txt b/samples/drivers/mbox/CMakeLists.txt index dee828b30ba..da90bcaed32 100644 --- a/samples/drivers/mbox/CMakeLists.txt +++ b/samples/drivers/mbox/CMakeLists.txt @@ -12,6 +12,7 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) set(REMOTE_ZEPHYR_DIR ${CMAKE_CURRENT_BINARY_DIR}/../remote/zephyr) if(("${BOARD}" STREQUAL "nrf5340dk") OR + ("${BOARD}${BOARD_IDENTIFIER}" STREQUAL "nrf5340bsim/nrf5340/cpuapp") OR ("${BOARD}" STREQUAL "nrf5340bsim_nrf5340_cpuapp") OR ("${BOARD}" STREQUAL "adp_xc7k") OR ("${BOARD}" STREQUAL "mimxrt1170_evkb") OR @@ -19,7 +20,7 @@ if(("${BOARD}" STREQUAL "nrf5340dk") OR ("${BOARD}" STREQUAL "mimxrt1160_evk") OR ("${BOARD}" STREQUAL "lpcxpresso55s69") OR ("${BOARD}" STREQUAL "nrf54h20dk")) - message(STATUS "${BOARD} compile as Main in this sample") + message(STATUS "${BOARD}${BOARD_IDENTIFIER} compile as Main in this sample") else() message(FATAL_ERROR "${BOARD} is not supported for this sample") endif() diff --git a/samples/drivers/mbox/Kconfig.sysbuild b/samples/drivers/mbox/Kconfig.sysbuild index dfc99e4aea1..7efe65b4c8f 100644 --- a/samples/drivers/mbox/Kconfig.sysbuild +++ b/samples/drivers/mbox/Kconfig.sysbuild @@ -9,6 +9,7 @@ config REMOTE_BOARD string default "nrf5340dk/nrf5340/cpunet" if $(BOARD) = "nrf5340dk" default "nrf5340bsim_nrf5340_cpunet" if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp" + default "nrf5340bsim/nrf5340/cpunet" if $(BOARD)$(BOARD_IDENTIFIER) = "nrf5340bsim/nrf5340/cpuapp" default "adp_xc7k/ae350" if $(BOARD) = "adp_xc7k" default "mimxrt1170_evkb/mimxrt1176/cm4" if $(BOARD) = "mimxrt1170_evkb" default "mimxrt1170_evk/mimxrt1176/cm4" if $(BOARD) = "mimxrt1170_evk" diff --git a/samples/drivers/mbox/remote/CMakeLists.txt b/samples/drivers/mbox/remote/CMakeLists.txt index 9a16f7588c6..33c4ad3cc28 100644 --- a/samples/drivers/mbox/remote/CMakeLists.txt +++ b/samples/drivers/mbox/remote/CMakeLists.txt @@ -10,6 +10,7 @@ cmake_minimum_required(VERSION 3.20.0) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) if(("${BOARD}" STREQUAL "nrf5340dk") OR + ("${BOARD}" STREQUAL "nrf5340bsim") OR ("${BOARD}" STREQUAL "nrf5340bsim_nrf5340_cpunet") OR ("${BOARD}" STREQUAL "mimxrt1170_evkb") OR ("${BOARD}" STREQUAL "mimxrt1170_evk") OR @@ -17,7 +18,7 @@ if(("${BOARD}" STREQUAL "nrf5340dk") OR ("${BOARD}" STREQUAL "lpcxpresso55s69") OR ("${BOARD}" STREQUAL "adp_xc7k") OR ("${BOARD}" STREQUAL "nrf54h20dk")) - message(STATUS "${BOARD} compile as remote in this sample") + message(STATUS "${BOARD}${BOARD_IDENTIFIER} compile as remote in this sample") else() message(FATAL_ERROR "${BOARD} is not supported for this sample") endif() diff --git a/samples/subsys/logging/multidomain/CMakeLists.txt b/samples/subsys/logging/multidomain/CMakeLists.txt index d800a86fac2..d2893ffa1dc 100644 --- a/samples/subsys/logging/multidomain/CMakeLists.txt +++ b/samples/subsys/logging/multidomain/CMakeLists.txt @@ -9,8 +9,9 @@ cmake_minimum_required(VERSION 3.20.0) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) if(NOT(("${BOARD}" STREQUAL "nrf5340dk") + OR ("${BOARD}${BOARD_IDENTIFIER}" STREQUAL "nrf5340bsim/nrf5340/cpuapp") OR ("${BOARD}" STREQUAL "nrf5340bsim_nrf5340_cpuapp"))) - message(FATAL_ERROR "${BOARD} is not supported for this sample") + message(FATAL_ERROR "${BOARD}${BOARD_IDENTIFIER} is not supported for this sample") endif() project(log_multidomain) diff --git a/samples/subsys/logging/multidomain/Kconfig.sysbuild b/samples/subsys/logging/multidomain/Kconfig.sysbuild index e6d2ccd9930..34b23ce2113 100644 --- a/samples/subsys/logging/multidomain/Kconfig.sysbuild +++ b/samples/subsys/logging/multidomain/Kconfig.sysbuild @@ -8,3 +8,4 @@ config NET_CORE_BOARD string default "nrf5340dk/nrf5340/cpunet" if $(BOARD) = "nrf5340dk" default "nrf5340bsim_nrf5340_cpunet" if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp" + default "nrf5340bsim/nrf5340/cpunet" if $(BOARD)$(BOARD_IDENTIFIER) = "nrf5340bsim/nrf5340/cpuapp" diff --git a/tests/bsim/bluetooth/audio_samples/broadcast_audio_sink/Kconfig.sysbuild b/tests/bsim/bluetooth/audio_samples/broadcast_audio_sink/Kconfig.sysbuild index 6ef6bede28d..c661fef422e 100644 --- a/tests/bsim/bluetooth/audio_samples/broadcast_audio_sink/Kconfig.sysbuild +++ b/tests/bsim/bluetooth/audio_samples/broadcast_audio_sink/Kconfig.sysbuild @@ -8,3 +8,4 @@ config NATIVE_SIMULATOR_PRIMARY_MCU_INDEX # Let's pass the test arguments to the application MCU test # otherwise by default they would have gone to the net core. default 0 if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp" + default 0 if $(BOARD) = "nrf5340bsim" diff --git a/tests/bsim/bluetooth/audio_samples/unicast_audio_client/Kconfig.sysbuild b/tests/bsim/bluetooth/audio_samples/unicast_audio_client/Kconfig.sysbuild index 4e7f66926c2..e29e9bb5642 100644 --- a/tests/bsim/bluetooth/audio_samples/unicast_audio_client/Kconfig.sysbuild +++ b/tests/bsim/bluetooth/audio_samples/unicast_audio_client/Kconfig.sysbuild @@ -8,3 +8,4 @@ config NATIVE_SIMULATOR_PRIMARY_MCU_INDEX # Let's pass the test arguments to the application MCU test # otherwise by default they would have gone to the net core. default 0 if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp" + default 0 if $(BOARD) = "nrf5340bsim" diff --git a/tests/bsim/bluetooth/ll/bis/Kconfig.sysbuild b/tests/bsim/bluetooth/ll/bis/Kconfig.sysbuild index 6c89fddc9f3..2ccde2c76ae 100644 --- a/tests/bsim/bluetooth/ll/bis/Kconfig.sysbuild +++ b/tests/bsim/bluetooth/ll/bis/Kconfig.sysbuild @@ -6,9 +6,11 @@ source "share/sysbuild/Kconfig" config NET_CORE_BOARD string default "nrf5340bsim_nrf5340_cpunet" if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp" + default "nrf5340bsim/nrf5340/cpunet" if $(BOARD)$(BOARD_IDENTIFIER) = "nrf5340bsim/nrf5340/cpuapp" config NATIVE_SIMULATOR_PRIMARY_MCU_INDEX int # Let's pass the test arguments to the application MCU test # otherwise by default they would have gone to the net core. default 0 if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp" + default 0 if $(BOARD) = "nrf5340bsim" diff --git a/tests/bsim/bluetooth/ll/cis/Kconfig.sysbuild b/tests/bsim/bluetooth/ll/cis/Kconfig.sysbuild index 6c89fddc9f3..2ccde2c76ae 100644 --- a/tests/bsim/bluetooth/ll/cis/Kconfig.sysbuild +++ b/tests/bsim/bluetooth/ll/cis/Kconfig.sysbuild @@ -6,9 +6,11 @@ source "share/sysbuild/Kconfig" config NET_CORE_BOARD string default "nrf5340bsim_nrf5340_cpunet" if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp" + default "nrf5340bsim/nrf5340/cpunet" if $(BOARD)$(BOARD_IDENTIFIER) = "nrf5340bsim/nrf5340/cpuapp" config NATIVE_SIMULATOR_PRIMARY_MCU_INDEX int # Let's pass the test arguments to the application MCU test # otherwise by default they would have gone to the net core. default 0 if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp" + default 0 if $(BOARD) = "nrf5340bsim" diff --git a/tests/bsim/bluetooth/ll/conn/Kconfig.sysbuild b/tests/bsim/bluetooth/ll/conn/Kconfig.sysbuild index 6c89fddc9f3..2ccde2c76ae 100644 --- a/tests/bsim/bluetooth/ll/conn/Kconfig.sysbuild +++ b/tests/bsim/bluetooth/ll/conn/Kconfig.sysbuild @@ -6,9 +6,11 @@ source "share/sysbuild/Kconfig" config NET_CORE_BOARD string default "nrf5340bsim_nrf5340_cpunet" if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp" + default "nrf5340bsim/nrf5340/cpunet" if $(BOARD)$(BOARD_IDENTIFIER) = "nrf5340bsim/nrf5340/cpuapp" config NATIVE_SIMULATOR_PRIMARY_MCU_INDEX int # Let's pass the test arguments to the application MCU test # otherwise by default they would have gone to the net core. default 0 if $(BOARD) = "nrf5340bsim_nrf5340_cpuapp" + default 0 if $(BOARD) = "nrf5340bsim"