Unable to build TensorFlow Lite Micro example on nRF5340DK

Hello,

I’m trying to run the TensorFlow Lite Micro example (zephyr_samples/hello_world) on my nRF5340DK using nRF Connect SDK 2.6.1, but I’m unable to build the project successfully.


Here’s what I’ve done:

Board: nrf5340dk_nrf5340_cpuapp

SDK version: 2.6.1

Is there something I’m missing in the configuration to get this example working with the nRF5340? Has anyone successfully built and run the TensorFlow Lite Micro sample on this board?
Thanks in advance!

Out

C:/nordic/myApps/hello_world_2/src/output_handler.hpp:20:10: fatal error: tensorflow/lite/c/common.h: No such file or directory
20 | #include <tensorflow/lite/c/common.h>

C:/ncs/v2.6.1/zephyr/lib/cpp/minimal/include -isystem C:/ncs/v2.6.1/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -fcheck-new -std=c++17 -Wno-register -fno-exceptions -fno-rtti -imacros C:/nordic/myApps/hello_world_2/build/zephyr/include/generated/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.6.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/nordic/myApps/hello_world_2=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.6.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.6.1=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -nostdinc++ -fno-threadsafe-statics -MD -MT CMakeFiles/app.dir/src/main_functions.cpp.obj -MF CMakeFiles\app.dir\src\main_functions.cpp.obj.d -o CMakeFiles/app.dir/src/main_functions.cpp.obj -c C:/nordic/myApps/hello_world_2/src/main_functions.cpp
C:/nordic/myApps/hello_world_2/src/main_functions.cpp:19:10: fatal error: tensorflow/lite/micro/micro_mutable_op_resolver.h: No such file or directory
19 | #include <tensorflow/lite/micro/micro_mutable_op_resolver.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.


[54/151] Linking C static library zephyr\lib\libc\common\liblib__libc__common.a
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE' --build 'c:\nordic\myApps\hello_world_2\build'

Related