Skip to content

Commit

Permalink
samples|tests several: Support using nrf5340bsim hwmv2 names
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
aescolar authored and carlescufi committed Mar 21, 2024
1 parent a994dc5 commit 4235efc
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 6 deletions.
1 change: 1 addition & 0 deletions samples/bluetooth/broadcast_audio_sink/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions samples/bluetooth/broadcast_audio_source/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions samples/bluetooth/public_broadcast_sink/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions samples/bluetooth/public_broadcast_source/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions samples/bluetooth/unicast_audio_client/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions samples/bluetooth/unicast_audio_server/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion samples/boards/nrf/nrf53_sync_rtc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions samples/boards/nrf/nrf53_sync_rtc/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
5 changes: 3 additions & 2 deletions samples/boards/nrf/nrf53_sync_rtc/net/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion samples/drivers/mbox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ 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
("${BOARD}" STREQUAL "mimxrt1170_evk") 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()
Expand Down
1 change: 1 addition & 0 deletions samples/drivers/mbox/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion samples/drivers/mbox/remote/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ 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
("${BOARD}" STREQUAL "mimxrt1160_evk") 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()
Expand Down
3 changes: 2 additions & 1 deletion samples/subsys/logging/multidomain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions samples/subsys/logging/multidomain/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions tests/bsim/bluetooth/ll/bis/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions tests/bsim/bluetooth/ll/cis/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions tests/bsim/bluetooth/ll/conn/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 4235efc

Please sign in to comment.