zephyr/samples/subsys/ipc/openamp/sysbuild.cmake
Jamie McCrae 88f30f3f51 samples: Use DEFAULT_IMAGE for sysbuild
Uses the variable for the default image when adding sysbuild
dependencies so that they can be copied out-of-tree and still work

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-28 20:54:25 -04:00

22 lines
674 B
CMake

# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2022 NXP
# Add external project
ExternalZephyrProject_Add(
APPLICATION openamp_remote
SOURCE_DIR ${APP_DIR}/remote
BOARD ${SB_CONFIG_OPENAMP_REMOTE_BOARD}
)
# Add dependencies so that the remote sample will be built first
# This is required because some primary cores need information from the
# remote core's build, such as the output image's LMA
add_dependencies(${DEFAULT_IMAGE} openamp_remote)
sysbuild_add_dependencies(CONFIGURE ${DEFAULT_IMAGE} openamp_remote)
if(SB_CONFIG_BOOTLOADER_MCUBOOT)
# Make sure MCUboot is flashed first
sysbuild_add_dependencies(FLASH openamp_remote mcuboot)
endif()