I’ve been trying to run an Image Classifier impulse on my STM32H745I-Disco Board, which has two MCUs: Arm-M4 and Arm-M7. However, even when I try to run a simple use case as in https://docs.edgeimpulse.com/docs/using-cubeai, I keep getting a lot of undefined reference errors (for the functions: ei_calloc, ei_free, ei_malloc, ei_printf_float, ei_read_timer_ms, and ei_run_impulse_check_canceled). I checked where these functions are defined and I only found their prototypes in the ei_classifier_porting.h file.
I’m using STM32CubeIDE, and it seems like an error when including new libraries. If my understanding is correct, when I program a dual-core board such as from the H7 series, then I must treat each MCU as a different CubeIDE project. This seems a bit confusing, below there’s a capture of the errors I’m hitting after following instructions carefully.
As seen below, there are two Middlewares folders, one for the general project (in this case, named EI-H745-ImageClassifier), and another one for the project associated with the Arm-M7 MCU (named EI-H745-ImageClassifier_CM7). It looks like the source code for the script ei_classifier_porting.h that is copied into the MCU’s directory, is the one for the HIMAX board, for some reason. I solved the problem by copying the content of the ei_classifier_porting.cpp from the stm32-cubeai folder into the one in the file: EI-H745-ImageClassifier_CM7>Middlewares>MachineLearning>image-classifier>Core>ei_classifier_porting.cpp.
Tried repeating the process again to check if it was an error from my side, but it doesn’t seem to be. Would appreciate if you guys could see if there is something missing when adding the Software Package associated to the .pack file.
However, now I’m hitting another error due to memory allocation, this is what I’m getting, maybe it’s related to the previous issue: