Makefile error (cubeAI tutorial)


I’m currently following the tutorial : “using cubeAI on STM32”.
Unfortunately, I’ve got a problem at the step11 : “add the CubeAI library by hand”
Even after adding my library (:NetworkRuntime500_CM4_IAR.a) and my library search path, I still can’t build my projet and have the following error : make: *** [makefile:59: Edge1.elf] Error 1

Moreover, I’ve got 5 warnings at the generation of the code :
Invalid project path: Include path not found (C:\Users\33781\Desktop\test\Edge1\Middlewares\Third_Party\EdgeImpulse_tinyML_ML\edgeimpulse\edge-impulse-sdk\CMSIS\DSP\Include).
Invalid project path: Include path not found (C:\Users\33781\Desktop\test\Edge1\Middlewares\Third_Party\EdgeImpulse_tinyML_ML\edgeimpulse\edge-impulse-sdk\CMSIS\DSP\PrivateInclude).
Invalid project path: Include path not found (C:\Users\33781\Desktop\test\Edge1\Middlewares\Third_Party\EdgeImpulse_tinyML_ML\edgeimpulse\edge-impulse-sdk\CMSIS\NN\Include).
Invalid project path: Include path not found (C:\Users\33781\Desktop\test\Edge1\Middlewares\Third_Party\EdgeImpulse_tinyML_ML\edgeimpulse\Middlewares\ST\AI\Inc).
Invalid project path: Missing project folder or file: \Edge1\Packs for Source path.

Thank’s for your help

@raphael.chauvet Which target is this on? I’ve just tested with a new project, using a CMSIS-PACK generated today, using STM32CubeIDE Version: 1.1.0 Build: 4551_20191014-1140 (UTC), for the B-L475E-IOT01A and this compiles fine. Also those folders referenced by your errors are in my tree…


Hello thanks for your answer. I’m using this configuration : STM32CubeIDE Version: 1.3.1
Build: 6291_20200406_0752 (UTC) for the DISCO_L475VG_IOT01A.

I don’t know why I don’t have those folders at the generation of my project…

Thank’s again

@raphael.chauvet This is very weird. I’ve just updated to Version: 1.3.1 Build: 6291_20200406_0752 (UTC), and regenerated the pack from your project ( and this gets added with no problem. I did make a small change by removing the . from your project. Based on earlier reports this might cause issues in CubeIDE. Could you regenerate the pack from the Deployment page in the studio and retry this?

Thank’s again for your answer @janjongboom
Ok, I regenerate the pack from deployment and add it to my project. It fix somes problems, but I still have this 2 warnings (before adding the CubeAI library) :

Then, i do the following thing on my IDE:

but I still have this warning :slight_smile:

After that, i need to rename my main.c into main.ccp to be able to do the printf ?

Thanks for your time and your answers.

(Sorry for the multiple posts, but I can only put 1 pic at a time)

Hi @raphael.chauvet but does this compile now despite the warning? Yes, the main.c / main.cpp stuff is super annoying, and I don’t understand why CubeIDE still generates a main.c everytime even though it’s a C++ project. But you should indeed be able to continue.

Yes, I can now compile my main.c, but I’ve got 2 errors and new warnings after renaming my main.c into main.cpp :

Yes, sorry this will be fixed later today. If you open edgeimpulse/edge-impulse-sdk/dsp/config.hpp and replace the content with:


#if defined(__MBED__) || defined(__TARGET_CPU_CORTEX_M0) || defined(__TARGET_CPU_CORTEX_M0PLUS) || defined(__TARGET_CPU_CORTEX_M3) || defined(__TARGET_CPU_CORTEX_M4) || defined(__TARGET_CPU_CORTEX_M7) || defined(USE_HAL_DRIVER) || defined(ECM3532)
        #define EIDSP_USE_CMSIS_DSP      1
#endif // Mbed / ARM Core check
#endif // ifndef EIDSP_USE_CMSIS_DSP

#define EIDSP_i16                q15_t
#define EIDSP_i8                 q7_t
#define ARM_MATH_ROUNDING        1
#define EIDSP_i16                int16_t
#define EIDSP_i8                 int8_t

#define EIDSP_USE_ASSERTS        1

#include <assert.h>
#define EIDSP_ERR(err_code) printf("ERR: %d (%s)\n", err_code, #err_code); assert(false)
#else // EIDSP_USE_ASSERTS == 0
#define EIDSP_ERR(err_code) return(err_code)

// To save memory you can quantize the filterbanks,
// this has an effect on runtime speed as CMSIS-DSP does not have optimized instructions
// for q7 matrix multiplication and matrix transformation...

// prints buffer allocations to stdout, useful when debugging


#endif // _EIDSP_CPP_CONFIG_H_

That should compile.

Thank’s @janjongboom
Yes I can now compile, I still have those warnings but I think that is not a problem to continue !

Thank’s again

Edit : I can’t configure the printf :frowning:
Here is my problems report after adding the 2 functions for the printf


#include <stdarg.h>

Before the function call, have added it to the docs.

Ok thank’s to this some errors disappeared but there is always this :

Could you add #include "edge-impulse-sdk/classifier/ei_run_classifier.h" as well? I’ve just compiled this with CubeIDE and that seems to work.

Docs are updated as well.

It seems to work I still have those warnings but I can compile !

Hope my problems helped you in some way
Once again, thank you for your time and your reactivity

Thanks! Yeah, I really want to solve this issue of manually copying pasting code into various places before the release, but I haven’t found a proper way yet. Will discuss with the rest of your team as well!

1 Like