-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
34 lines (25 loc) · 1010 Bytes
/
CMakeLists.txt
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
34
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0)
# For the sake of demonstration, we add the driver directory as a zephyr module
# by hand. If your driver is a project that's managed by west, you can remove this line.
list(APPEND ZEPHYR_EXTRA_MODULES
${CMAKE_CURRENT_SOURCE_DIR}/drivers/adxl345
${CMAKE_CURRENT_SOURCE_DIR}/drivers/bme680
${CMAKE_CURRENT_SOURCE_DIR}/drivers/ultrasonic
)
# Select our board
set(BOARD rpi_pico)
# For using west flash with picoprobe
set(OPENOCD "/usr/local/bin/openocd")
set(OPENOCD_DEFAULT_PATH "/usr/local/share/openocd/scripts")
set(RPI_PICO_DEBUG_ADAPTER "picoprobe")
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
# This is only used by IntelliSense inside VS Code
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Project name
project(sensor-node LANGUAGES C VERSION 0.0.1)
# Add the include directory
zephyr_include_directories(include)
# Add source files
FILE(GLOB SRC_FILES "src/*.c")
target_sources(app PRIVATE ${SRC_FILES})