-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
41 lines (30 loc) · 1.03 KB
/
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
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.13.1)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(example-standalone-inferencing-zephyr)
include(utils/cmake/utils.cmake)
# Needed for colorful output
zephyr_compile_options(-fdiagnostics-color=always)
# Use hardware acceleration for DSP and Neural Network code
# You'll need to disable these on non-Arm cores
add_definitions(-DEI_CLASSIFIER_TFLITE_ENABLE_CMSIS_NN=1
-DARM_MATH_LOOPUNROLL
)
# If using Nordic boards, add the following definition
# -DEI_NORDIC
# Add the Edge Impulse SDK
add_subdirectory(edge-impulse-sdk/cmake/zephyr)
# Edge impulse SDK include directories
set(INCLUDES
.
src
tflite-model
model-parameters
)
include_directories(${INCLUDES})
RECURSIVE_FIND_FILE(MODEL_FILES "tflite-model" "*.cpp")
list(APPEND SOURCE_FILES ${MODEL_FILES})
# add all sources to the project
target_sources(app PRIVATE ${SOURCE_FILES})
target_sources(app PRIVATE src/main.cpp)