• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# TensorFlow Lite for Microcontroller demo app Makefile
3#
4
5# Environment Checks ###########################################################
6
7ifeq ($(ANDROID_BUILD_TOP),)
8$(error "You must run build/envsetup.sh and lunch first")
9endif
10
11# Nanoapp Configuration ########################################################
12
13NANOAPP_NAME = tflm_demo
14NANOAPP_ID = 0x476f6f676c002008
15NANOAPP_VERSION = 0x00000001 # Version scheme: 0xMMmmpppp
16
17NANOAPP_NAME_STRING = \"TFLM\ Demo\"
18
19# Source Directories ###########################################################
20
21NANOAPP_PATH = src
22
23# Common Compiler Flags ########################################################
24
25# Include paths
26COMMON_CFLAGS += -I$(ANDROID_BUILD_TOP)/system/chre/util/include
27COMMON_CFLAGS += -I./src
28
29# Defines
30COMMON_CFLAGS += -DLOG_LEVEL=LOG_LEVEL_INFO
31COMMON_CFLAGS += -DNANOAPP_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_INFO
32COMMON_CFLAGS += -DCHRE_NANOAPP_DISABLE_BACKCOMPAT
33COMMON_CFLAGS += -DNDEBUG
34
35# If OPT_LEVEL is unset, defaulting to 3.
36ifeq ($(OPT_LEVEL),)
37	OPT_LEVEL = 3
38endif
39
40# Common Source Files ##########################################################
41
42COMMON_SRCS += $(NANOAPP_PATH)/main.cc
43COMMON_SRCS += $(NANOAPP_PATH)/model.cc
44COMMON_SRCS += $(NANOAPP_PATH)/sine_model_data.cc
45
46# TensorFlow Lite for Micro ####################################################
47
48TFLM_PATH = $(ANDROID_BUILD_TOP)/system/chre/external/tflm/latest
49USE_TFLM = true
50
51# Makefile Includes ############################################################
52
53include $(ANDROID_BUILD_TOP)/system/chre/build/nanoapp/app.mk
54