From 61eee06b545d061e511ce0ed242ff75cd24c712f Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Wed, 20 Mar 2024 08:50:29 +0000 Subject: [PATCH] samples: drivers: mbox: Fix usage of board name checking Fixes using outdated hwmv1 board name checking with proper board defines Signed-off-by: Jamie McCrae --- samples/drivers/mbox/CMakeLists.txt | 18 ++++++++---------- samples/drivers/mbox/remote/CMakeLists.txt | 18 ++++++++---------- samples/drivers/mbox/sysbuild.cmake | 15 +++++++-------- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/samples/drivers/mbox/CMakeLists.txt b/samples/drivers/mbox/CMakeLists.txt index 7f70d8ae07f..d279843dacd 100644 --- a/samples/drivers/mbox/CMakeLists.txt +++ b/samples/drivers/mbox/CMakeLists.txt @@ -11,18 +11,16 @@ 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_QUALIFIERS}" 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")) +if(CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP OR + CONFIG_BOARD_NRF5340BSIM_NRF5340_CPUAPP OR + CONFIG_BOARD_ADP_XC7K_AE350 OR + CONFIG_BOARD_MIMXRT1170_EVK_MIMXRT1176_CM7 OR + CONFIG_BOARD_MIMXRT1160_EVK_MIMXRT1166_CM7 OR + CONFIG_BOARD_LPCXPRESSO55S69_LPC55S69_CPU0 OR + CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP) message(STATUS "${BOARD}${BOARD_QUALIFIERS} compile as Main in this sample") else() - message(FATAL_ERROR "${BOARD} is not supported for this sample") + message(FATAL_ERROR "${BOARD}${BOARD_QUALIFIERS} is not supported for this sample") endif() project(mbox_ipc) diff --git a/samples/drivers/mbox/remote/CMakeLists.txt b/samples/drivers/mbox/remote/CMakeLists.txt index c8be4d8173d..9c19a0e8b46 100644 --- a/samples/drivers/mbox/remote/CMakeLists.txt +++ b/samples/drivers/mbox/remote/CMakeLists.txt @@ -9,18 +9,16 @@ 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")) +if(CONFIG_BOARD_NRF5340DK_NRF5340_CPUNET OR + CONFIG_BOARD_NRF5340BSIM_NRF5340_CPUNET OR + CONFIG_BOARD_ADP_XC7K_AE350 OR + CONFIG_BOARD_MIMXRT1170_EVK_MIMXRT1176_CM4 OR + CONFIG_BOARD_MIMXRT1160_EVK_MIMXRT1166_CM4 OR + CONFIG_BOARD_LPCXPRESSO55S69_LPC55S69_CPU1 OR + CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUPPR) message(STATUS "${BOARD}${BOARD_QUALIFIERS} compile as remote in this sample") else() - message(FATAL_ERROR "${BOARD} is not supported for this sample") + message(FATAL_ERROR "${BOARD}${BOARD_QUALIFIERS} is not supported for this sample") endif() project(mbox_ipc_remote) diff --git a/samples/drivers/mbox/sysbuild.cmake b/samples/drivers/mbox/sysbuild.cmake index f39e7b74316..769d33d3f77 100644 --- a/samples/drivers/mbox/sysbuild.cmake +++ b/samples/drivers/mbox/sysbuild.cmake @@ -20,13 +20,12 @@ native_simulator_set_child_images(${DEFAULT_IMAGE} ${REMOTE_APP}) native_simulator_set_final_executable(${DEFAULT_IMAGE}) -if ("${BOARD}" STREQUAL "mimxrt1170_evk" OR - "${BOARD}" STREQUAL "mimxrt1160_evk" OR - "${BOARD}" STREQUAL "lpcxpresso55s69" - ) - # For these NXP boards the main core application is dependent on - # 'zephyr_image_info.h' generated by remote application. +if(SB_CONFIG_BOARD_MIMXRT1160_EVK_MIMXRT1166_CM7 OR + SB_CONFIG_BOARD_MIMXRT1170_EVK_MIMXRT1176_CM7 OR + SB_CONFIG_BOARD_LPCXPRESSO55S69_LPC55S69_CPU0) + # For these NXP boards the main core application is dependent on + # 'zephyr_image_info.h' generated by remote application. - # Let's build the remote application first - add_dependencies(${DEFAULT_IMAGE} ${REMOTE_APP}) + # Let's build the remote application first + add_dependencies(${DEFAULT_IMAGE} ${REMOTE_APP}) endif()