cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6 DevKit cannot create buildable AI project from CubeIDE via create new project

caker
Associate

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? 

4 REPLIES 4
Julian E.
ST Employee

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:

  • C/C++ general
  • Path and symbols
  • make sure to include the path to include the needed directories

 

Do the same thing for anything that is has an "undiffined reference".

 

Make sure to use STM32CubeIDE 1.17

 

Have a good day,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
caker
Associate

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?

caker_0-1739982924856.png

 

No I was wrong, it's still not building the Middlewares.

caker
Associate

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:

caker_1-1739987635729.png

 

Is this a bug, or is there a way to force the IOC generation to include these middleware files in the source locations tab?