2025-02-18 01:14 PM
I am evaluating AI with the STM32N6570-DK. I can create a starting project with the new project wizard (cubeMX inside cubeIDE) by targeting that dev kit. It produces FSBL and APPLI projects that build fine. When I add in the X-CUBE-AI middleware via the .ioc gui and feed it a ONNX model it seems to work great analyzing the model, showing the graph, then creating code to initialize and run it. However the resultant project code will not compile (either in FSBL or APPLI, I tried both). It seems like it is failing to include some HAL and/or LL functions when it generates the code. The specific errors I get are all "undefined reference to `LL_ATON_..." and undefined reference to "mcu_cache_clean_range"
In the middleware I am including X-CUBE-AI v10.0.0 core and application (ApplicationTemplate). Do I need to include something else for dependencies? What am I missing here?
2025-02-19 05:07 AM - edited 2025-02-19 05:10 AM
Hello @caker,
"undefined reference to" generally mean that the linker cannot find the implementation of a function or variable that has been declared. This typically happens due to missing files, incorrect configuration or linker settings.
In the project properties can you verify that the include paths have been generated properly.
For mcu_cache_clean_range, try to locate it in your project.
In my case it was in the non_secure application and in /src/mcu_cache.c
Once located, go right click on your application or FSBL depending on where you found your file and click properties, then:
Do the same thing for anything that is has an "undiffined reference".
Make sure to use STM32CubeIDE 1.17
Have a good day,
Julian
2025-02-19 08:36 AM
I played around with the include paths and it did not fix the issue. However I noticed the Middleware (and other folders) were placed outside the Appli project, so were not being built. I can drag those folders into the project and get most of the errors to go away, but is this the right thing to do? should I drag a link instead? why did the automatic generation mess this up?
2025-02-19 08:47 AM
No I was wrong, it's still not building the Middlewares.
2025-02-19 09:54 AM
ok, so if I "Link Folder..." in Paths and Symbols to the Middleware folders that are not being built, it works. However if I regenerate code with the IOC, it removes these manual settings:
Is this a bug, or is there a way to force the IOC generation to include these middleware files in the source locations tab?