blob: e2c649e19eb548b9ee0885fe480da4b796bee128 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# 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(BOARD "native_sim/native/64")
set(ZEPHYR_MODULES
"${CMAKE_CURRENT_SOURCE_DIR}/rtos/modules/cmsis"
"${CMAKE_CURRENT_SOURCE_DIR}/rtos/modules/stm32"
"${CMAKE_CURRENT_SOURCE_DIR}/rtos/modules/mbedtls"
"${CMAKE_CURRENT_SOURCE_DIR}/rtos/modules/mcuboot"
)
set(ZEPHYR_BASE "${CMAKE_CURRENT_SOURCE_DIR}/rtos/zephyr")
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)
|