Deployment of project as a C++ Library for FRDM K64F

Hello,
I have developed an ML model on the platform. However, I am not able to deploy it to the FRDM K64F development board. I have an error whose snippet is like the one below. How do I solve it? I am using MCU Expresso as my IDE.

\motion-detection-final-accurate\edge-impulse-sdk\dsp/numpy_types.h:104: undefined reference to `ei_calloc(unsigned int, unsigned int)'

Thank you

Hello @lorrainemakuyana,

I am not familiar with MCU Expresso IDE nor the the FRDM K64F development board.
Maybe someone from the community is more experienced and has completed a project with a similar setup?

Can anyone help @lorrainemakuyana ?

Regards,

Louis

Hi @lorrainemakuyana,

You may want to check this tutorial to import in your MCUXpresso project: Demo: Edge Impulse SDK Deployment using MCUXpresso IDE on NXP iMX.RT1020-EVK. - YouTube

Aurelien

Thank you very much @aurel and @louis

I have checked out the video on YouTube, followed it step by step by the error still occurs.

in function `ei::ei_matrix::ei_matrix(unsigned long, unsigned long, float*)'
numpy_types.h:104: undefined reference to `ei_calloc(unsigned int, unsigned int)'

@lorrainemakuyana,

As this board is not officially supported there are a couple of functions that need to be redefined for your target. You can have more information here: Deploy your model as a C++ library - Edge Impulse Documentation

In the example tutorial above, this has been implemented in this source file.

Aurelien

1 Like

Thank you very much @aurel

I have added the function implementations for my target and have put the ei_classifier_porting.cpp file at the same location as the corresponding header file, the ei_classifier_porting.h file.

However, the error still occurs and I am not sure why, because I have added all the function implementations and I have linked the cpp file to its .h file correctly.

Hello,

So I managed to solve the errors above somehow. Now, I have a new error on my hands, from a different set of files. Here is a snapshot of the error.

All of the functions in the file matrix_functions.h are resulting in this error, undefined reference to function functinName(parameters) etc. But the functions are linked correctly and I wonder how this problem is arising. Is there something else I should implement or change?

Thank you in advance