But when I try to compile my own code, I get an error message that the ei_run_classifier.h header file does not exist.
I have redeployed the model several times, and I am certain it is in the right folder.
I suspect it might have to do with the configs but I have not been able to fix it yet.
I am deploying on a nRF52840-DK and my Nordic SDK Version is 1.9.1
I appreciate any help.
Error Message
$ west build -b nrf52840dk_nrf52840 samples/sensor/amg88xx --pristine
-- west build: making build dir C:\ncs\v2.4.2\zephyr\build pristine
-- west build: generating a build system
Including boilerplate (Zephyr base): C:/ncs/v2.4.2/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/ncs/v2.4.2/zephyr/samples/sensor/amg88xx
-- Using NCS Toolchain 2.4.0 for building. (C:/ncs/toolchains/31f4403e35/cmake)
-- Zephyr version: 2.7.99 (C:/ncs/v2.4.2/zephyr), build: v2.7.99-ncs1-1
-- Found Python3: C:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: C:/ncs/v2.4.2/zephyr/.cache
-- Found host-tools: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found dtc: C:/ncs/toolchains/31f4403e35/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found BOARD.dts: C:/ncs/v2.4.2/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Found devicetree overlay: C:/ncs/v2.4.2/zephyr/samples/sensor/amg88xx/app.overlay
-- Generated zephyr.dts: C:/ncs/v2.4.2/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/ncs/v2.4.2/zephyr/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/ncs/v2.4.2/zephyr/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: C:/ncs/v2.4.2/zephyr/build/zephyr/dts.cmake
Parsing C:/ncs/v2.4.2/zephyr/Kconfig
Loaded configuration 'C:/ncs/v2.4.2/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
Merged configuration 'C:/ncs/v2.4.2/zephyr/samples/sensor/amg88xx/prj.conf'
Configuration saved to 'C:/ncs/v2.4.2/zephyr/build/zephyr/.config'
Kconfig header saved to 'C:/ncs/v2.4.2/zephyr/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
CMake Warning at ../../../CMakeLists.txt:1687 (message):
__ASSERT() statements are globally ENABLED
-- Configuring done
-- Generating done
-- Build files have been written to: C:/ncs/v2.4.2/zephyr/build
←[92m-- west build: building application
[88/168] Building CXX object CMakeFiles/app.dir/src/main.cpp.obj
FAILED: CMakeFiles/app.dir/src/main.cpp.obj
C:\ncs\toolchains\31f4403e35\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-g++.exe -DBUILD_VERSION=v2.7.99-ncs1-1 -DKERNEL -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.4.2/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.4.2/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/ncs/v2.4.2/zephyr/lib/libc/newlib/include -IC:/ncs/v2.4.2/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.4.2/nrf/include -IC:/ncs/v2.4.2/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.4.2/modules/hal/nordic/nrfx -IC:/ncs/v2.4.2/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.4.2/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.4.2/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.4.2/modules/debug/segger/SEGGER -IC:/ncs/v2.4.2/modules/debug/segger/Config -IC:/ncs/v2.4.2/zephyr/modules/segger/. -isystem C:/ncs/v2.4.2/nrfxlib/crypto/nrf_cc310_platform/include -Os -fcheck-new -std=c++11 -Wno-register -fno-exceptions -fno-rtti -imacros C:/ncs/v2.4.2/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -imacros C:/ncs/v2.4.2/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/ncs/v2.4.2/zephyr/samples/sensor/amg88xx=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.4.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.4.2=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -MD -MT CMakeFiles/app.dir/src/main.cpp.obj -MF CMakeFiles\app.dir\src\main.cpp.obj.d -o CMakeFiles/app.dir/src/main.cpp.obj -c C:/ncs/v2.4.2/zephyr/samples/sensor/amg88xx/src/main.cpp
C:/ncs/v2.4.2/zephyr/samples/sensor/amg88xx/src/main.cpp:4:10: fatal error: edge-impulse-sdk/classifier/ei_run_classifier.h: No such file or directory
4 | #include "edge-impulse-sdk/classifier/ei_run_classifier.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[93/168] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\31f4403e35\opt\bin\cmake.EXE' --build 'C:\ncs\v2.4.2\zephyr\build'
Hi @rwahidi!
Thanks for the update. Could you confirm you have the edge-impulse-sdk directory in the same place where src, model-parameter and others are? Then, add the following line to your CMakeLists.txt:
so what you did is : first tested the building of the standalone zephyr sample running which is described here (On your Zephyr-based Nordic Semiconductor development board - Edge Impulse Documentation) and then you replaced * edge-impulse-sdk /model-parameters/tflite-modelwith the ones of your own C++ library using edge impulse that you built.is that all what i’m suppose to do deploy my model on my nrf52840dk?
so what i did is that i switched my sdk from 1.9.1 to 2.1.0
and i added my nrf52840dk overlay file and about the prj file i keep on this error about those 2 lines :CONFIG_CPP=y
CONFIG_GLIBCXX_LIBCPP=y
can you help me please if there anything i’m missing