ERR: Failed to setup audio sampling

Question/Issue:
I am running my auto generated firmware on my Silabs xG24 Lab Kit. I keep hitting this error when I am running my impulse.

image
This is the config:

When I run it as a simplicity studio component. (This tutorial just with the files in the ei-model directory changed to my edge impulse files) I can see that it fails when attempting to allocate memory for the microphone buffer. It seems like this is because n_samples is too large at 80000.

What aspect of my project do I need to change so this doesn’t happen?

Update: Lowering sample length to 1 second still fails during debugging in the same place.

Thanks for any help!

Project ID:
120020

Context/Use case:
Running AI model to use microphonic data to detect people.

Hello @SethW,

I just had a quick look at your project and I noticed that your window increase is bigger than your window size:

Please have a look at the graph here which might help you understand how the window increase work: https://docs.edgeimpulse.com/docs/edge-impulse-studio/create-impulse#time-series-audio-vibration-movements

In your case you will miss a lot of interesting features (for 10 sec of data, you will only use 2 sec for the training).

That being said, it won’t solve your issue but I don’t see anything odd. Did you change some parameters since your last post?

Regards,

Louis

Hey @louis,

Update#1: Just running the firmware Deployment for the 1000ms version on the board works fine:

Update#2
Silicon Labs version works fine too, it must have been me moving the files. I think when I moved them I didn’t first delete the files in the ei-model that was there before hand.

image

Sorry for causing a commotion without checking if it was user error first. Im going to check to see if the 5000 ms version might also work.

Thanks,
Seth

The 5000ms firmware version fails
image
The Impulse is using these settings:


And here is the AT+CONFIG?:

Have any ideas on why the 5000ms version isn’t working?

Thanks
Seth

Hi @SethW
The issue here is how our firmware allocates memory for inference purposes.
We are allocating two buffers. The first one is passed to NN for inference, while the second one filling with data. Then, they are swapped. The second one is passed to NN for inference during the first filling with data.
Each buffer has to be as long as your ML model input, in your case 5 seconds. This gives us:
2 buffers * 5 seconds * 16000 samples/second * 2 bytes/sample = 320kBytes
The xG24 has only 256kB of RAM, so you can’t use such a big input for your audio using our standalone firmware

You have two solutions:

  1. Modify our firmware to use only one buffer instead of two, and run inference taking turns with data collecting.
  2. Take a look at our standalone inference for Silabs boards. It is the simplest, inference-only firmware. You just need to get/write the audio sampling part. Then you can reduce RAM usage by using only one audio buffer and collecting the data between inferences.

Mateusz

1 Like

Hey @mateusz,

Thanks for the description, that breakdown of memory size helped me understand.

I am attempting the standalone inference for Silab boards tutorial you linked and I am getting these errors:


and:

I can move past these errors and force generation but when I attempt to build it fails because of these errors:

14:20:54 **** Incremental Build of configuration GNU ARM v10.3.1 - Default for project inference-example ****
make -j4 all 
Building file: C:/Users/seth.worthylake/Desktop/inferencing-standalone/example-standalone-inferencing-silabs-main/src/app.cpp
Building file: C:/Users/seth.worthylake/Desktop/inferencing-standalone/example-standalone-inferencing-silabs-main/src/main.cpp
Invoking: GNU ARM C++ Compiler
Invoking: GNU ARM C++ Compiler
arm-none-eabi-g++ -g3 -gdwarf-2 -mcpu=cortex-m33 -mthumb -std=c++0x '-DEFR32MG24B310F1536IM48=1' '-DSL_BOARD_NAME="BRD2601B"' '-DSL_BOARD_REV="A01"' '-DSL_COMPONENT_CATALOG_PRESENT=1' -I"C:\Users\seth.worthylake\SimplicityStudio\v5_workspace\inference-example\config" -I"C:\Users\seth.worthylake\SimplicityStudio\v5_workspace\inference-example\autogen" -IC:/Users/seth.worthylake/Desktop/inferencing-standalone/example-standalone-inferencing-silabs-main/src -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/Device/SiliconLabs/EFR32MG24/Include" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/common/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/CMSIS/Include" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/emlib/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/emlib/host/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/service/iostream/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//util/third_party/printf" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//util/third_party/printf/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/common/toolchain/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/service/system/inc" -Os -Wall -Wextra -fno-builtin -ffunction-sections -fdata-sections -imacrossl_gcc_preinclude.h -mfpu=fpv5-sp-d16 -mfloat-abi=hard -fno-rtti -fno-exceptions -Wno-unused-parameter -Werror=return-type -c -fmessage-length=0 -MMD -MP -MF"src/app.d" -MT"src/app.o" -o "src/app.o" "C:/Users/seth.worthylake/Desktop/inferencing-standalone/example-standalone-inferencing-silabs-main/src/app.cpp"
Building file: C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk/util/third_party/printf/src/iostream_printf.c
arm-none-eabi-g++ -g3 -gdwarf-2 -mcpu=cortex-m33 -mthumb -std=c++0x '-DEFR32MG24B310F1536IM48=1' '-DSL_BOARD_NAME="BRD2601B"' '-DSL_BOARD_REV="A01"' '-DSL_COMPONENT_CATALOG_PRESENT=1' -I"C:\Users\seth.worthylake\SimplicityStudio\v5_workspace\inference-example\config" -I"C:\Users\seth.worthylake\SimplicityStudio\v5_workspace\inference-example\autogen" -IC:/Users/seth.worthylake/Desktop/inferencing-standalone/example-standalone-inferencing-silabs-main/src -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/Device/SiliconLabs/EFR32MG24/Include" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/common/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/CMSIS/Include" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/emlib/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/emlib/host/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/service/iostream/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//util/third_party/printf" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//util/third_party/printf/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/common/toolchain/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/service/system/inc" -Os -Wall -Wextra -fno-builtin -ffunction-sections -fdata-sections -imacrossl_gcc_preinclude.h -mfpu=fpv5-sp-d16 -mfloat-abi=hard -fno-rtti -fno-exceptions -Wno-unused-parameter -Werror=return-type -c -fmessage-length=0 -MMD -MP -MF"src/main.d" -MT"src/main.o" -o "src/main.o" "C:/Users/seth.worthylake/Desktop/inferencing-standalone/example-standalone-inferencing-silabs-main/src/main.cpp"
Invoking: GNU ARM C Compiler
arm-none-eabi-gcc -g3 -gdwarf-2 -mcpu=cortex-m33 -mthumb -std=c99 '-DEFR32MG24B310F1536IM48=1' '-DSL_BOARD_NAME="BRD2601B"' '-DSL_BOARD_REV="A01"' '-DSL_COMPONENT_CATALOG_PRESENT=1' -I"C:\Users\seth.worthylake\SimplicityStudio\v5_workspace\inference-example\config" -I"C:\Users\seth.worthylake\SimplicityStudio\v5_workspace\inference-example\autogen" -IC:/Users/seth.worthylake/Desktop/inferencing-standalone/example-standalone-inferencing-silabs-main/src -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/Device/SiliconLabs/EFR32MG24/Include" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/common/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/CMSIS/Include" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/emlib/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/emlib/host/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/service/iostream/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//util/third_party/printf" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//util/third_party/printf/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/common/toolchain/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/service/system/inc" -Os -Wall -Wextra -fno-builtin -ffunction-sections -fdata-sections -imacrossl_gcc_preinclude.h -mfpu=fpv5-sp-d16 -mfloat-abi=hard -Wno-unused-parameter -Werror=return-type -c -fmessage-length=0 -MMD -MP -MF"gecko_sdk_4.0.2/util/third_party/printf/src/iostream_printf.d" -MT"gecko_sdk_4.0.2/util/third_party/printf/src/iostream_printf.o" -o "gecko_sdk_4.0.2/util/third_party/printf/src/iostream_printf.o" "C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk/util/third_party/printf/src/iostream_printf.c"
Building file: C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk/util/third_party/printf/printf.c
Invoking: GNU ARM C Compiler
arm-none-eabi-gcc -g3 -gdwarf-2 -mcpu=cortex-m33 -mthumb -std=c99 '-DEFR32MG24B310F1536IM48=1' '-DSL_BOARD_NAME="BRD2601B"' '-DSL_BOARD_REV="A01"' '-DSL_COMPONENT_CATALOG_PRESENT=1' -I"C:\Users\seth.worthylake\SimplicityStudio\v5_workspace\inference-example\config" -I"C:\Users\seth.worthylake\SimplicityStudio\v5_workspace\inference-example\autogen" -IC:/Users/seth.worthylake/Desktop/inferencing-standalone/example-standalone-inferencing-silabs-main/src -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/Device/SiliconLabs/EFR32MG24/Include" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/common/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/CMSIS/Include" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/emlib/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/emlib/host/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/service/iostream/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//util/third_party/printf" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//util/third_party/printf/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/common/toolchain/inc" -I"C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk//platform/service/system/inc" -Os -Wall -Wextra -fno-builtin -ffunction-sections -fdata-sections -imacrossl_gcc_preinclude.h -mfpu=fpv5-sp-d16 -mfloat-abi=hard -Wno-unused-parameter -Werror=return-type -c -fmessage-length=0 -MMD -MP -MF"gecko_sdk_4.0.2/util/third_party/printf/printf.d" -MT"gecko_sdk_4.0.2/util/third_party/printf/printf.o" -o "gecko_sdk_4.0.2/util/third_party/printf/printf.o" "C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk/util/third_party/printf/printf.c"
C:/Users/seth.worthylake/Desktop/inferencing-standalone/example-standalone-inferencing-silabs-main/src/app.cpp:17:10: fatal error: edge-impulse-sdk/classifier/ei_run_classifier.h: No such file or directory
   17 | #include "edge-impulse-sdk/classifier/ei_run_classifier.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [src/subdir.mk:23: src/app.o] Error 1
make: *** Waiting for unfinished jobs....
Finished building: C:/Users/seth.worthylake/Desktop/inferencing-standalone/example-standalone-inferencing-silabs-main/src/main.cpp
Finished building: C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk/util/third_party/printf/src/iostream_printf.c
 
 
Finished building: C:/Users/seth.worthylake/SimplicityStudio/SDKs/gecko_sdk/util/third_party/printf/printf.c
 
"make -j4 all" terminated with exit code 2. Build might be incomplete.

The ei-model directory has been filled with my impulses files so it should be worknig?

I am attempting using Gecko SDK v4.0.2 and GNU Arm v10.3.1

Do you have any idea why this might be happening? Thanks!

Hi @SethW
Did you solve the issue? I can’t reproduce it on my side.

Mateusz

Hey @mateusz

I was not able to figure it out, but I have moved past it. I did have a question about your earlier answer here: ERR: Failed to setup audio sampling - #6 by mateusz

Your answer makes sense but I wonder where would I learn that as an edge impulse user without getting into the code?

For example at this deployment page I am looking at a exporting a project that has a sampling frequency of 16KHz and window length of 1000ms. Meaning


This RAM and latency prediction is just based on how long NN Classifier will take, not on any implementation of that NN Classifier, right?

Seth

Hi @SethW
Who do you mean by

any implementation of that NN Classifier

?

The latency calculations are based on our algorithm and benchmarks run for each supported board. Knowing the latency for known conditions, we calculate latency for any other model.
RAM usage is the real usage by the model, not by additional firmware stuff. Because you can write your own implementation of the sensor/audio data capturing. What we provide as our firmware is just an example implementation.

Mateusz

Hey @mateusz,

By that I meant that the prediction is strictly about the resource usage of the model, not the resource usage of any implementation such as this one: https://github.com/edgeimpulse/firmware-silabs-xg24#using-simplicity-studio-v5.

The occupancy detection project I am working on is to be implemented into a larger project which only has roughly 80Kbs of RAM available for collecting data, processing it, and classifying it. So finding a precise understand of resource usage for each model and its implementation is important.

Hi @SethW
You are right the numbers displayed on the Deployment page are only counting memory required by the model (so, mainly the Tensor Arena and Flash footprint of the model).
You must analyze your firmware against memory usage of other parts (sample capturing module, preprocessing, etc.).

Mateusz

@mateusz

Thank you that clarification is important!

An update on my attempt for the standalone inference tutorial:


Currently getting a failure regarding not being able to find this include:
#include “edge-impulse-sdk/classifier/ei_run_classifier.h”

Even though I have filled the ei-model directory with my edge impulse model:

Any ideas?

Hey @mateusz

I was able to figure out the issue.

So when I was importing the project something was happening with the slcp or slcc file and most of the project settings weren’t carrying over. Because of that I made sure to manually add the include path to the ei-model to both the C and C++ compilers in the project properties page.

This fix solved my issues regarding the compiler not being able to find the files in the ei-model directory.

After that I started getting odd errors like this:

Finished building: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/memory.cpp
 
Building target: inference-example_2.axf
Invoking: GNU ARM C++ Linker
arm-none-eabi-g++ '@inference-example_2.axf.rsp' -o inference-example_2.axf 
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./gecko_sdk_4.0.2/edge-impulse-sdk/dsp/dct/fast-dct-fft.o: in function `ei::ei_matrix::~ei_matrix()':
c:\users\seth.worthylake\desktop\inferencing-standalone\ei-model\edge-impulse-sdk\dsp/numpy_types.h:124: undefined reference to `ei_free(void*)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./gecko_sdk_4.0.2/edge-impulse-sdk/dsp/kissfft/kiss_fft.o: in function `kf_work(kiss_fft_cpx*, kiss_fft_cpx const*, unsigned int, int, int*, kiss_fft_state*)':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/kissfft/kiss_fft.cpp:205: undefined reference to `ei_malloc(unsigned int)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./gecko_sdk_4.0.2/edge-impulse-sdk/dsp/kissfft/kiss_fft.o: in function `kf_bfly_generic':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/kissfft/kiss_fft.cpp:228: undefined reference to `ei_free(void*)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./gecko_sdk_4.0.2/edge-impulse-sdk/dsp/kissfft/kiss_fft.o: in function `kiss_fft_alloc':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/kissfft/kiss_fft.cpp:340: undefined reference to `ei_malloc(unsigned int)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./gecko_sdk_4.0.2/edge-impulse-sdk/dsp/kissfft/kiss_fft.o: in function `kiss_fft_stride':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/kissfft/kiss_fft.cpp:381: undefined reference to `ei_malloc(unsigned int)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/kissfft/kiss_fft.cpp:384: undefined reference to `ei_free(void*)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./gecko_sdk_4.0.2/edge-impulse-sdk/dsp/kissfft/kiss_fftr.o: in function `kiss_fftr_alloc':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/kissfft/kiss_fftr.cpp:28: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/kissfft/kiss_fftr.cpp:37: undefined reference to `ei_malloc(unsigned int)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./gecko_sdk_4.0.2/edge-impulse-sdk/dsp/kissfft/kiss_fftr.o: in function `kiss_fftr':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/kissfft/kiss_fftr.cpp:79: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./gecko_sdk_4.0.2/tflite-model/trained_model_compiled.o: in function `(anonymous namespace)::AllocatePersistentBuffer(TfLiteContext*, unsigned int)':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/tflite-model/trained_model_compiled.cpp:354: undefined reference to `ei_calloc(unsigned int, unsigned int)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `(anonymous namespace)::ei_aligned_free(void*)':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_aligned_malloc.h:107: undefined reference to `ei_free(void*)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `(anonymous namespace)::ei_aligned_calloc(unsigned int, unsigned int)':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_aligned_malloc.h:69: undefined reference to `ei_calloc(unsigned int, unsigned int)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `inference_tflite_run(unsigned long long, TfLiteTensor*, unsigned char*, ei_impulse_result_t*, bool) [clone .constprop.0]':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/inferencing_engines/tflite_eon.h:145: undefined reference to `ei_read_timer_us()'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/inferencing_engines/tflite_eon.h:152: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `inference_tflite_run(unsigned long long, TfLiteTensor*, unsigned char*, ei_impulse_result_t*, bool) [clone .constprop.0]':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_fill_result_struct.h:274: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `fill_result_struct_i8':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_fill_result_struct.h:275: undefined reference to `ei_printf_float(float)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_fill_result_struct.h:276: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `inference_tflite_run(unsigned long long, TfLiteTensor*, unsigned char*, ei_impulse_result_t*, bool) [clone .constprop.0]':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/inferencing_engines/tflite_eon.h:180: undefined reference to `ei_run_impulse_check_canceled()'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `inference_tflite_run(unsigned long long, TfLiteTensor*, unsigned char*, ei_impulse_result_t*, bool) [clone .constprop.0]':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_fill_result_struct.h:291: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `fill_result_struct_f32':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_fill_result_struct.h:292: undefined reference to `ei_printf_float(float)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_fill_result_struct.h:293: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_fill_result_struct.h:291: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_fill_result_struct.h:292: undefined reference to `ei_printf_float(float)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_fill_result_struct.h:293: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `inference_tflite_setup(unsigned long long*, TfLiteTensor**, TfLiteTensor**, std::unique_ptr<void, void (*)(void*)>&) [clone .constprop.0]':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/inferencing_engines/tflite_eon.h:82: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/inferencing_engines/tflite_eon.h:86: undefined reference to `ei_read_timer_us()'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `ei::ei_matrix::ei_matrix(unsigned long, unsigned long, float*)':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/numpy_types.h:99: undefined reference to `ei_calloc(unsigned int, unsigned int)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `ei::numpy::software_rfft(float*, float*, unsigned int, unsigned int)':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/numpy.hpp:1740: undefined reference to `ei_malloc(unsigned int)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/numpy.hpp:1750: undefined reference to `ei_free(void*)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/numpy.hpp:1764: undefined reference to `ei_free(void*)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/numpy.hpp:1765: undefined reference to `ei_free(void*)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `(anonymous namespace)::extract_image_features(ei::ei_signal_t*, ei::ei_matrix*, void*, float)':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_dsp.h:1199: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_dsp.h:1200: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `run_nn_inference(ei::ei_matrix*, ei_impulse_result_t*, bool)':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/inferencing_engines/tflite_eon.h:208: undefined reference to `ei_read_timer_us()'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/inferencing_engines/tflite_eon.h:256: undefined reference to `ei_read_timer_us()'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `run_inference':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_classifier.h:398: undefined reference to `ei_run_impulse_check_canceled()'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `run_nn_inference_image_quantized(ei::ei_signal_t*, ei_impulse_result_t*, bool)':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/inferencing_engines/tflite_eon.h:301: undefined reference to `ei_read_timer_us()'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `ei::ei_matrix_i8::ei_matrix_i8(unsigned long, unsigned long, signed char*)':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/numpy_types.h:263: undefined reference to `ei_calloc(unsigned int, unsigned int)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `run_nn_inference_image_quantized(ei::ei_signal_t*, ei_impulse_result_t*, bool)':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_dsp.h:1322: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `extract_image_features_quantized':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_dsp.h:1323: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `run_nn_inference_image_quantized(ei::ei_signal_t*, ei_impulse_result_t*, bool)':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/inferencing_engines/tflite_eon.h:309: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `ei::ei_matrix_i8::~ei_matrix_i8()':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/dsp/numpy_types.h:288: undefined reference to `ei_free(void*)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `run_classifier':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_classifier.h:441: undefined reference to `ei_read_timer_us()'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_classifier.h:449: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_classifier.h:467: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_classifier.h:471: undefined reference to `ei_run_impulse_check_canceled()'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_classifier.h:478: undefined reference to `ei_read_timer_us()'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_classifier.h:482: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_classifier.h:484: undefined reference to `ei_printf_float(float)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_classifier.h:485: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_classifier.h:487: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_classifier.h:492: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o: in function `(anonymous namespace)::extract_spectrogram_features(ei::ei_signal_t*, ei::ei_matrix*, void*, float)':
C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_dsp.h:584: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_dsp.h:585: undefined reference to `ei_printf(char const*, ...)'
c:/siliconlabs/simplicitystudio/v5_3/developer/toolchains/gnu_arm/10.3_2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: ./src/app.o:C:/Users/seth.worthylake/Desktop/inferencing-standalone/ei-model/edge-impulse-sdk/classifier/ei_run_dsp.h:615: more undefined references to `ei_printf(char const*, ...)' follow
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:130: inference-example_2.axf] Error 1
"make -j4 all" terminated with exit code 2. Build might be incomplete.

09:22:27 Build Failed. 86 errors, 6 warnings. (took 1m:49s.74ms)

These were because I needed to define the porting type and the board type using the projects defined symbols settings.

Without EI_PORTING_SILABS defined as 1, then there are function declarations in
ei-model/edge-impulse-sdk/porting/ei_classifier_porting.h without any function definitions.
Its because these function definitions, which can be found (for a silabs project) in ei-model/edge-impulse-sdk/porting/silabs/ei_classifier_porting.cpp, arn`t declared if EI_PORTING_SILABS isn’t 1.

I have now got the standalone inferencing example in a working state.
Let me know if anything about this awnser is factually incorrect and I can change it.
I hope this helps anyone who falls into a similar situation as me. :smiley:

Regards,
Seth

2 Likes