From 04f4abae5822fe166c9100e36e4631bbb82744e5 Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 29 Aug 2024 17:39:27 +0200 Subject: firmware: Adapt CMakeLists.txt to Git submodules The following properties are now set in CMakeLists.txt: - Zephyr kernel path - required Zephyr module paths - selected board This makes the command line call for CMake trivial: cmake -Bbuild -GNinja The user does not have to specify these options on the command line. --- firmware/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/firmware/CMakeLists.txt b/firmware/CMakeLists.txt index c520b2b..b0093d0 100644 --- a/firmware/CMakeLists.txt +++ b/firmware/CMakeLists.txt @@ -1,5 +1,9 @@ cmake_minimum_required(VERSION 3.20.0) -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) + +set(BOARD "nucleo_f767zi") +set(ZEPHYR_MODULES + "${CMAKE_CURRENT_SOURCE_DIR}/zephyrproject/modules/hal/cmsis;${CMAKE_CURRENT_SOURCE_DIR}/zephyrproject/modules/hal/stm32") +find_package(Zephyr REQUIRED HINTS "${CMAKE_CURRENT_SOURCE_DIR}/zephyrproject/zephyr") project(iot-contact) target_sources(app PRIVATE src/main.c) -- cgit v1.2.3-70-g09d2