summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-08-29 17:39:27 +0200
committerxengineering <me@xengineering.eu>2024-08-29 17:39:27 +0200
commit04f4abae5822fe166c9100e36e4631bbb82744e5 (patch)
tree139573138188da7f20d3a4573627cd7a3a5508d4
parent22d914b78ece2e67d4bd2c6829f716b5760594c1 (diff)
downloadiot-contact-04f4abae5822fe166c9100e36e4631bbb82744e5.tar
iot-contact-04f4abae5822fe166c9100e36e4631bbb82744e5.tar.zst
iot-contact-04f4abae5822fe166c9100e36e4631bbb82744e5.zip
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.
-rw-r--r--firmware/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
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)