2023-10-24 16:24:55 +08:00
|
|
|
# Copyright (c) 2023 Nordic Semiconductor ASA
|
2024-01-31 00:12:34 +08:00
|
|
|
# Copyright 2023-2024 NXP
|
2023-10-24 16:24:55 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
if("${SB_CONFIG_REMOTE_BOARD}" STREQUAL "")
|
|
|
|
message(FATAL_ERROR
|
2024-06-26 19:43:16 +08:00
|
|
|
"Target ${BOARD}${BOARD_QUALIFIERS} not supported for this sample. "
|
2023-10-24 16:24:55 +08:00
|
|
|
"There is no remote board selected in Kconfig.sysbuild")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(REMOTE_APP remote)
|
|
|
|
|
|
|
|
ExternalZephyrProject_Add(
|
|
|
|
APPLICATION ${REMOTE_APP}
|
|
|
|
SOURCE_DIR ${APP_DIR}/${REMOTE_APP}
|
|
|
|
BOARD ${SB_CONFIG_REMOTE_BOARD}
|
|
|
|
)
|
|
|
|
|
2023-11-30 01:48:02 +08:00
|
|
|
native_simulator_set_child_images(${DEFAULT_IMAGE} ${REMOTE_APP})
|
2023-10-24 16:24:55 +08:00
|
|
|
|
2023-11-30 01:48:02 +08:00
|
|
|
native_simulator_set_final_executable(${DEFAULT_IMAGE})
|
2023-12-21 22:15:22 +08:00
|
|
|
|
2024-03-20 16:50:29 +08:00
|
|
|
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.
|
2023-12-21 22:15:22 +08:00
|
|
|
|
2024-03-20 16:50:29 +08:00
|
|
|
# Let's build the remote application first
|
|
|
|
add_dependencies(${DEFAULT_IMAGE} ${REMOTE_APP})
|
2023-12-21 22:15:22 +08:00
|
|
|
endif()
|