From 37acd5e6712bc91e6c5fd3b9cdde06ff9a3cada3 Mon Sep 17 00:00:00 2001 From: chao an Date: Mon, 9 Dec 2024 15:07:22 +0800 Subject: [PATCH] mlearning: fix build break if enable cmsis-nn apps/mlearning/tflite-micro/tflite-micro/tensorflow/lite/micro/kernels/cmsis_nn/conv.cc:18:10: fatal error: Include/arm_nnfunctions.h: No such file or directory 18 | #include "Include/arm_nnfunctions.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: chao an --- mlearning/cmsis-nn/CMakeLists.txt | 3 +++ mlearning/tflite-micro/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mlearning/cmsis-nn/CMakeLists.txt b/mlearning/cmsis-nn/CMakeLists.txt index c5944620d..43cbcfe89 100644 --- a/mlearning/cmsis-nn/CMakeLists.txt +++ b/mlearning/cmsis-nn/CMakeLists.txt @@ -69,6 +69,8 @@ if(CONFIG_MLEARNING_CMSIS_NN) ${CMSIS_NN_DIR}/Source/LSTMFunctions/*.c ${CMSIS_NN_DIR}/Source/ReshapeFunctions/*.c) + set(CMSIS_NN_INCDIR ${CMAKE_CURRENT_LIST_DIR}/cmsis-nn/Include) + if(CONFIG_ARM_NEON) list( REMOVE_ITEM @@ -86,5 +88,6 @@ if(CONFIG_MLEARNING_CMSIS_NN) nuttx_add_library(cmsis_nn STATIC) target_compile_options(cmsis_nn PRIVATE ${CFLAGS}) target_sources(cmsis_nn PRIVATE ${CMSIS_NN_SRCS}) + target_include_directories(cmsis_nn PUBLIC ${CMSIS_NN_INCDIR}) endif() diff --git a/mlearning/tflite-micro/CMakeLists.txt b/mlearning/tflite-micro/CMakeLists.txt index 482e920b7..abc9b9fa5 100644 --- a/mlearning/tflite-micro/CMakeLists.txt +++ b/mlearning/tflite-micro/CMakeLists.txt @@ -152,7 +152,7 @@ if(CONFIG_TFLITEMICRO) ${NUTTX_APPS_DIR}/system/flatbuffers/flatbuffers/include) if(CONFIG_MLEARNING_CMSIS_NN) - list(APPEND INCDIR ${NUTTX_APPS_DIR}/apps/mlearning/cmsis-nn/cmsis-nn) + list(APPEND INCDIR ${NUTTX_APPS_DIR}/mlearning/cmsis-nn/cmsis-nn) endif() # ############################################################################