This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 546bbd21d mlearning/tflite-micro: use the same compile flags in Make
and CMake
546bbd21d is described below
commit 546bbd21d7baeb8ae0c33c702563924fa106b728
Author: Abhishek Mishra <[email protected]>
AuthorDate: Mon Sep 21 15:13:44 2026 +0000
mlearning/tflite-micro: use the same compile flags in Make and CMake
Define TF_LITE_STATIC_MEMORY and TFLITE_EMULATE_FLOAT in both build
systems. Drop the CMake-only -O3 so optimization follows NuttX
Kconfig, and remove the duplicate CMSIS_NN define, KissFFT include,
and non-English comment.
Signed-off-by: Abhishek Mishra <[email protected]>
---
mlearning/tflite-micro/CMakeLists.txt | 15 +++++----------
mlearning/tflite-micro/Makefile | 1 +
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/mlearning/tflite-micro/CMakeLists.txt
b/mlearning/tflite-micro/CMakeLists.txt
index 919dcd146..af44b7020 100644
--- a/mlearning/tflite-micro/CMakeLists.txt
+++ b/mlearning/tflite-micro/CMakeLists.txt
@@ -62,16 +62,12 @@ if(CONFIG_TFLITEMICRO)
set(COMMON_FLAGS
-DTF_LITE_STATIC_MEMORY
+ -DTFLITE_EMULATE_FLOAT
-DTF_LITE_DISABLE_X86_NEON
+ -Wno-shadow
-Wno-sign-compare
- -Wno-unused-variable
-Wno-undef
- -Wno-shadow
- -O3)
-
- if(CONFIG_MLEARNING_CMSIS_NN)
- list(APPEND COMMON_FLAGS -DCMSIS_NN)
- endif()
+ -Wno-unused-variable)
if(CONFIG_TFLITEMICRO_DEBUG)
list(APPEND COMMON_FLAGS -DTF_LITE_SHOW_MEMORY_USE)
@@ -132,7 +128,7 @@ if(CONFIG_TFLITEMICRO)
endif()
endforeach()
- # 添加CMSIS_NN文件
+ # Add CMSIS-NN kernel sources
list(APPEND NEW_TFLITE_MICRO_SRCS ${CMSIS_NN_SRCS})
set(TFLITE_MICRO_SRCS ${NEW_TFLITE_MICRO_SRCS})
@@ -153,9 +149,8 @@ if(CONFIG_TFLITEMICRO)
set(INCDIR
${NUTTX_APPS_DIR}/math/gemmlowp/gemmlowp
- ${NUTTX_APPS_DIR}/math/ruy/ruy
- ${NUTTX_APPS_DIR}/math/kissfft/kissfft
${NUTTX_APPS_DIR}/math/kissfft/kissfft
+ ${NUTTX_APPS_DIR}/math/ruy/ruy
${NUTTX_APPS_DIR}/mlearning/tflite-micro/tflite-micro
${NUTTX_APPS_DIR}/system/flatbuffers/flatbuffers/include)
diff --git a/mlearning/tflite-micro/Makefile b/mlearning/tflite-micro/Makefile
index 179d0e9c3..7d23bc5d1 100644
--- a/mlearning/tflite-micro/Makefile
+++ b/mlearning/tflite-micro/Makefile
@@ -56,6 +56,7 @@ COMMON_FLAGS += -Wno-shadow
COMMON_FLAGS += -Wno-sign-compare
COMMON_FLAGS += -Wno-undef
COMMON_FLAGS += -Wno-unused-variable
+COMMON_FLAGS += -DTF_LITE_STATIC_MEMORY
COMMON_FLAGS += -DTFLITE_EMULATE_FLOAT
COMMON_FLAGS += -DTF_LITE_DISABLE_X86_NEON
ifneq ($(CONFIG_TFLITEMICRO_DEBUG),)