zephyr/samples/subsys/ipc/openamp/sysbuild.cmake
Grzegorz Swiderski 6640c04df6 sysbuild: Remove IMAGES variable
This variable was originally provided for two indended purposes:

  * Let users manually add a new image in a desired order in the list.
  * Let users set build-only images, which are excluded from the list.

Given the recent additions of the `sysbuild_add_dependencies()` function
and the `BUILD_ONLY` parameter, `IMAGES` should be considered obsolete.

Furthermore, the list of images added to sysbuild should be updated
automatically when calling `ExternalZephyrProject_Add()`. This is now
possible by using a GLOBAL property internal to sysbuild.

With that, the `IMAGES` variable can be removed. Its existing usage for
image ordering is replaced with `sysbuild_add_dependencies()` treewide.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-09-05 15:27:04 +02:00

22 lines
656 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(openamp openamp_remote)
sysbuild_add_dependencies(CONFIGURE openamp openamp_remote)
if(SB_CONFIG_BOOTLOADER_MCUBOOT)
# Make sure MCUboot is flashed first
sysbuild_add_dependencies(FLASH openamp_remote mcuboot)
endif()