Implementation of edge impulse model on my nrf5sdk code

When I want to implement my edge impulse model to my nrf5sdk code using vs code I found this errors,

Terminal will be reused by tasks, press any key to close it.

Executing task: make <

makefile:312: Cannot find include folder: C:\Users\ghaaz\Desktop\nRF5_SDK_15.3.0_59ac345/examples/test/le_app_blinky/edge_impulse
Compiling file: main.c
Linking target: _build/nrf52840_xxaa.out
c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/…/lib/gcc/arm-none-eabi/10.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: _build/nrf52840_xxaa.out section .bss' will not fit in region RAM’
c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/…/lib/gcc/arm-none-eabi/10.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: region RAM overflowed with stack
c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/…/lib/gcc/arm-none-eabi/10.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: region RAM' overflowed by 3945636 bytes c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: _build/nrf52840_xxaa/activations.cpp.o: in function tflite::ops::micro::activations::ReluEval(TfLiteContext*, TfLiteNode*)’:
C:\Users\ghaaz\Desktop\nRF5_SDK_15.3.0_59ac345\examples\test\ble_app_blinky\pca10056\s140\armgcc/…/…/…/edge_impulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/activations.cpp:188: undefined reference to TfLiteTypeGetName' c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: _build/nrf52840_xxaa/activations.cpp.o: in function tflite::ops::micro::activations::Relu6Eval(TfLiteContext*, TfLiteNode*)’:
C:\Users\ghaaz\Desktop\nRF5_SDK_15.3.0_59ac345\examples\test\ble_app_blinky\pca10056\s140\armgcc/…/…/…/edge_impulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/activations.cpp:255: undefined reference to TfLiteTypeGetName' c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: _build/nrf52840_xxaa/fully_connected.cpp.o: in function tflite::(anonymous namespace)::Prepare(TfLiteContext*, TfLiteNode*)’:
C:\Users\ghaaz\Desktop\nRF5_SDK_15.3.0_59ac345\examples\test\ble_app_blinky\pca10056\s140\armgcc/…/…/…/edge_impulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/fully_connected.cpp:1310: undefined reference to TfLiteTypeGetName' c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\ghaaz\Desktop\nRF5_SDK_15.3.0_59ac345\examples\test\ble_app_blinky\pca10056\s140\armgcc/../../../edge_impulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/fully_connected.cpp:1310: undefined reference to TfLiteTypeGetName’
c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/…/lib/gcc/arm-none-eabi/10.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: _build/nrf52840_xxaa/fully_connected.cpp.o: in function tflite::(anonymous namespace)::Eval(TfLiteContext*, TfLiteNode*)': C:\Users\ghaaz\Desktop\nRF5_SDK_15.3.0_59ac345\examples\test\ble_app_blinky\pca10056\s140\armgcc/../../../edge_impulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/fully_connected.cpp:1380: undefined reference to TfLiteTypeGetName’
c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/…/lib/gcc/arm-none-eabi/10.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: _build/nrf52840_xxaa/softmax.cpp.o:C:\Users\ghaaz\Desktop\nRF5_SDK_15.3.0_59ac345\examples\test\ble_app_blinky\pca10056\s140\armgcc/…/…/…/edge_impulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/softmax.cpp:197: more undefined references to `TfLiteTypeGetName’ follow
collect2.exe: error: ld returned 1 exit status
make: *** [_build/nrf52840_xxaa.out] Error 1
The terminal process “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command make” terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

have you any idea about how to fix this?

Hi @Ghazi
It seems like your firmware is too big:

Check if you didn’t allocate statically huge arrays or similar objects.

Best regards,
Mateusz

I have only this errors have you an idea about how to solve this
Executing task: make <

Compiling file: main.c
Linking target: _build/nrf52840_xxaa.out
c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/…/lib/gcc/arm-none-eabi/10.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: _build/nrf52840_xxaa/activations.cpp.o: in function tflite::ops::micro::activations::ReluEval(TfLiteContext*, TfLiteNode*)': C:\Users\ghaaz\Desktop\nRF5_SDK_15.3.0_59ac345\examples\test\ble_app_blinky1\pca10056\s140\armgcc/../../../edge_impulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/activations.cpp:188: undefined reference to TfLiteTypeGetName’
c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/…/lib/gcc/arm-none-eabi/10.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: _build/nrf52840_xxaa/activations.cpp.o: in function tflite::ops::micro::activations::Relu6Eval(TfLiteContext*, TfLiteNode*)': C:\Users\ghaaz\Desktop\nRF5_SDK_15.3.0_59ac345\examples\test\ble_app_blinky1\pca10056\s140\armgcc/../../../edge_impulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/activations.cpp:255: undefined reference to TfLiteTypeGetName’
c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/…/lib/gcc/arm-none-eabi/10.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: _build/nrf52840_xxaa/fully_connected.cpp.o: in function tflite::(anonymous namespace)::Prepare(TfLiteContext*, TfLiteNode*)': C:\Users\ghaaz\Desktop\nRF5_SDK_15.3.0_59ac345\examples\test\ble_app_blinky1\pca10056\s140\armgcc/../../../edge_impulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/fully_connected.cpp:1310: undefined reference to TfLiteTypeGetName’
c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/…/lib/gcc/arm-none-eabi/10.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: C:\Users\ghaaz\Desktop\nRF5_SDK_15.3.0_59ac345\examples\test\ble_app_blinky1\pca10056\s140\armgcc/…/…/…/edge_impulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/fully_connected.cpp:1310: undefined reference to TfLiteTypeGetName' c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: _build/nrf52840_xxaa/fully_connected.cpp.o: in function tflite::(anonymous namespace)::Eval(TfLiteContext*, TfLiteNode*)’:
C:\Users\ghaaz\Desktop\nRF5_SDK_15.3.0_59ac345\examples\test\ble_app_blinky1\pca10056\s140\armgcc/…/…/…/edge_impulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/fully_connected.cpp:1380: undefined reference to TfLiteTypeGetName' c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: _build/nrf52840_xxaa/softmax.cpp.o:C:\Users\ghaaz\Desktop\nRF5_SDK_15.3.0_59ac345\examples\test\ble_app_blinky1\pca10056\s140\armgcc/../../../edge_impulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/softmax.cpp:197: more undefined references to TfLiteTypeGetName’ follow
collect2.exe: error: ld returned 1 exit status
make: *** [_build/nrf52840_xxaa.out] Error 1
The terminal process “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command make” terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

I contacted the Nordic dev zone and they advice me to contact your forum They said
" > /…/…/edge_impulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/fully_connected.cpp:1310: undefined reference to `TfLiteTypeGetName’

The output clearly states undefined reference(s) from the Edge Impulse SDK. As this is not a part of the nRF5 SDK you will need to contact Edge Impulse forum for support."
Can you give an advice about how to solve this issue?

Hi @Ghazi ,
Sorry for the late response. Your error suggests that you didn’t add some files to the compilation process. The missing function TfLiteTypeGetName is defined here:

edge-impulse-sdk/tensorflow/lite/c/common.c

Mateusz