# This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at https://mozilla.org/MPL/2.0/. cmake_minimum_required(VERSION 3.20.0) set(KEY_DEFAULT "$ENV{HOME}/mcuboot/key.pem") set(KEY ${KEY_DEFAULT} CACHE STRING "Firmware signing key path") message(STATUS "Firmware signing key path: ${KEY}") set(BOARD "native_sim/native/64") add_subdirectory(rtos) string(REPLACE ";" "," ZEPHYR_MODULES_COMMA "${ZEPHYR_MODULES}") include(ExternalProject) ExternalProject_Add( btl PREFIX btl SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/rtos/modules/mcuboot/boot/zephyr" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/btl" INSTALL_COMMAND "" LIST_SEPARATOR "," CMAKE_ARGS "-DBOARD=nucleo_f767zi" "-DZEPHYR_BASE=${ZEPHYR_BASE}" "-DZEPHYR_MODULES=${ZEPHYR_MODULES_COMMA}" "-DEXTRA_CONF_FILE=${CMAKE_CURRENT_SOURCE_DIR}/btl/bootloader.conf" -DCONFIG_BOOT_SIGNATURE_KEY_FILE="${KEY}" ) add_subdirectory(app)