blob: 0d75ee7a407afed0f1eface0037aa2da549e0aa7 [file] [log] [blame]
# Copyright (c) 2022 Nordic Semiconductor
#
# SPDX-License-Identifier: Apache-2.0
# Include MCUboot if enabled.
if(SB_CONFIG_BOOTLOADER_MCUBOOT)
set(image mcuboot)
ExternalZephyrProject_Add(
APPLICATION ${image}
SOURCE_DIR ${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/zephyr/
APP_TYPE BOOTLOADER
)
# MCUBoot default configuration is to perform a full chip erase.
# Placing MCUBoot first in list to ensure it is flashed before other images.
set(IMAGES ${image} ${IMAGES} PARENT_SCOPE)
set_config_string(${image} CONFIG_BOOT_SIGNATURE_KEY_FILE "${SB_CONFIG_BOOT_SIGNATURE_KEY_FILE}")
endif()