mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
mlearning/tflite-micro: add tflm tool into cmake build
Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
parent
3fd04e86e8
commit
8b253d699c
1 changed files with 23 additions and 1 deletions
|
|
@ -59,7 +59,6 @@ if(CONFIG_TFLITEMICRO)
|
|||
set(COMMON_FLAGS
|
||||
-DTF_LITE_STATIC_MEMORY
|
||||
-DTF_LITE_DISABLE_X86_NEON
|
||||
-DTF_LITE_STRIP_ERROR_STRINGS
|
||||
-Wno-sign-compare
|
||||
-Wno-unused-variable
|
||||
-Wno-undef
|
||||
|
|
@ -70,6 +69,13 @@ if(CONFIG_TFLITEMICRO)
|
|||
list(APPEND COMMON_FLAGS -DCMSIS_NN)
|
||||
endif()
|
||||
|
||||
if(CONFIG_TFLITEMICRO_DEBUG)
|
||||
list(APPEND COMMON_FLAGS -DTF_LITE_SHOW_MEMORY_USE)
|
||||
list(APPEND COMMON_FLAGS -DTF_LITE_USE_CTIME)
|
||||
else()
|
||||
list(APPEND COMMON_FLAGS -DTF_LITE_STRIP_ERROR_STRINGS)
|
||||
endif()
|
||||
|
||||
# ############################################################################
|
||||
# Sources
|
||||
# ############################################################################
|
||||
|
|
@ -156,4 +162,20 @@ if(CONFIG_TFLITEMICRO)
|
|||
target_sources(tflite_micro PRIVATE ${TFLITE_MICRO_SRCS})
|
||||
target_include_directories(tflite_micro PUBLIC ${INCDIR})
|
||||
|
||||
if(CONFIG_TFLITEMICRO_TOOL)
|
||||
nuttx_add_application(
|
||||
NAME
|
||||
tflm
|
||||
STACKSIZE
|
||||
${CONFIG_TFLITEMICRO_TOOL_STACKSIZE}
|
||||
PRIORITY
|
||||
${CONFIG_TFLITEMICRO_TOOL_PRIORITY}
|
||||
SRCS
|
||||
${CMAKE_CURRENT_LIST_DIR}/tflm_tool.cc
|
||||
INCLUDE_DIRECTORIES
|
||||
${INCDIR}
|
||||
COMPILE_FLAGS
|
||||
${COMMON_FLAGS})
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue