1# 2# Copyright (c) 2021 Carlo Caione <ccaione@baylibre.com> 3# Copyright 2023-2024 NXP 4# 5# SPDX-License-Identifier: Apache-2.0 6# 7 8cmake_minimum_required(VERSION 3.20.0) 9 10find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) 11 12set(REMOTE_ZEPHYR_DIR ${CMAKE_CURRENT_BINARY_DIR}/../remote/zephyr) 13 14if(CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP OR 15 CONFIG_BOARD_NRF5340BSIM_NRF5340_CPUAPP OR 16 CONFIG_BOARD_ADP_XC7K_AE350 OR 17 CONFIG_BOARD_MIMXRT1170_EVK_MIMXRT1176_CM7 OR 18 CONFIG_BOARD_MIMXRT1160_EVK_MIMXRT1166_CM7 OR 19 CONFIG_BOARD_LPCXPRESSO55S69_LPC55S69_CPU0 OR 20 CONFIG_BOARD_ESP32_DEVKITC_WROOM_ESP32_PROCPU OR 21 CONFIG_BOARD_ESP32S3_DEVKITM_ESP32S3_PROCPU OR 22 CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP OR 23 CONFIG_BOARD_NRF54H20DK_NRF54H20_CPURAD OR 24 CONFIG_BOARD_NRF54L15DK_NRF54L15_CPUAPP OR 25 CONFIG_BOARD_STM32H747I_DISCO_STM32H747XX_M7) 26 message(STATUS "${BOARD}${BOARD_QUALIFIERS} compile as Main in this sample") 27else() 28 message(FATAL_ERROR "${BOARD}${BOARD_QUALIFIERS} is not supported for this sample") 29endif() 30 31project(mbox_ipc) 32 33enable_language(C ASM) 34 35if(CONFIG_INCLUDE_REMOTE_DIR) 36 target_include_directories(zephyr_interface 37 INTERFACE ${REMOTE_ZEPHYR_DIR}/include/public) 38endif() 39 40if("${BOARD}" STREQUAL "esp32_devkitc_wrover_procpu" OR "${BOARD}" STREQUAL "esp32s3_devkitm_procpu") 41 set_source_files_properties(${REMOTE_ZEPHYR_DIR}/esp32_appcpu_firmware.c PROPERTIES GENERATED TRUE) 42 target_sources(app PRIVATE src/main.c ${REMOTE_ZEPHYR_DIR}/esp32_appcpu_firmware.c) 43else() 44 target_sources(app PRIVATE src/main.c) 45endif() 46