summaryrefslogtreecommitdiff
path: root/fw/CMakeLists.txt
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2025-03-21 22:48:02 +0100
committerxengineering <me@xengineering.eu>2025-03-21 22:48:02 +0100
commita398f3b7420525b11c31dadf07b0cd696f1f6d3c (patch)
tree1715700740f9285b120bee8d3e8df7a53bc24efc /fw/CMakeLists.txt
parent61238e93e2c5b3c672d3a55f6273bfd3615f05d7 (diff)
downloadiot-contact-a398f3b7420525b11c31dadf07b0cd696f1f6d3c.tar
iot-contact-a398f3b7420525b11c31dadf07b0cd696f1f6d3c.tar.zst
iot-contact-a398f3b7420525b11c31dadf07b0cd696f1f6d3c.zip
fw: Use MCUboot bootloader for nucleo_f767zi
Using it for the native_sim board is not trivial. Thus it is first only added for the Nucleo board.
Diffstat (limited to 'fw/CMakeLists.txt')
-rw-r--r--fw/CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/fw/CMakeLists.txt b/fw/CMakeLists.txt
index 8d9591f..eff06f2 100644
--- a/fw/CMakeLists.txt
+++ b/fw/CMakeLists.txt
@@ -11,6 +11,23 @@ set(ZEPHYR_MODULES
"${CMAKE_CURRENT_SOURCE_DIR}/zephyrproject/modules/crypto/mbedtls"
"${CMAKE_CURRENT_SOURCE_DIR}/zephyrproject/bootloader/mcuboot"
)
+
+string(REPLACE ";" "," ZEPHYR_MODULES_COMMA "${ZEPHYR_MODULES}")
+include(ExternalProject)
+ExternalProject_Add(
+ bootloader
+ PREFIX bootloader
+ SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/zephyrproject/bootloader/mcuboot/boot/zephyr"
+ BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/bootloader"
+ INSTALL_COMMAND ""
+ LIST_SEPARATOR ","
+ CMAKE_ARGS
+ "-DBOARD=nucleo_f767zi"
+ "-DZEPHYR_MODULES=${ZEPHYR_MODULES_COMMA}"
+ "-DEXTRA_CONF_FILE=${CMAKE_CURRENT_SOURCE_DIR}/zephyrproject/bootloader/bootloader.conf"
+ -DCONFIG_BOOT_SIGNATURE_KEY_FILE="${KEY}"
+)
+
find_package(Zephyr
REQUIRED
HINTS