2025-09-04 8:36 AM - edited 2025-09-04 9:29 AM
The examples/code snippets found in the ST Edge AI Core Technology Documentation (ST Edge AI Core Technology 2.2.0) show a variety of functions/macros used that don't seem to get generated via STM32CubeMX on my end.
For reference, I generated the code for CMake, with version 10.2.0 of X-Cube-AI and 6.13.0 of STM32CubeMX.
A couple examples from the legacy client -> new edge ai embedded client migration guide:
Is this specific to the code generated for CMake? Are there perhaps other header files I should be looking to include aside form the ones noted in the examples?
EDIT: Confirmed that these issues are also still present with the code generated for STM32CubeIDE, so issues seem to be platform agnostic.
2025-09-05 1:19 AM
Hello @oliv_ch,
This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.
Best regards,
Maxime
2025-09-23 4:35 AM
From what I understand, X-CUBE-AI and ST Edge AI are two completely separate things and have nothing in common.
X-CUBE-AI is a package for CubeMX to create the app templates/validation apps for a given model (e.g. TFLite). Here, the code is generated purely in C. ST Edge AI, on the other hand, is a more recent software tool to generate APIs and static libraries of a given model to be included in your custom project. It has a completely different client API (incl. header names) and - from what I found so far - does not generate pure C code. Instead, the actual calculation is "hidden" inside of a static library to be included in your custom project. The generated code merely defines the API, buffers, and model dimensions of the static library. This is somewhat contrary to the ST Edge AI marketing, which suggests that the model is converted to *.c/*.h files.
That being said, I am still figuring out ST's AI tool landscape which is pretty confusing ...
2025-09-23 5:53 AM - edited 2025-09-23 5:58 AM
Hello @kahuna,
The ST Edge AI Core is, as its name indicate, the core component of AI within ST.
X Cube AI is a GUI inside CubeMX that calls the ST Edge AI Core CLI. In X Cube AI, the "Analyze" call the analyze in the core CLI (if you look at the terminal while doing the analyze, you will clearly see it calling the ST Edge AI Core). In the same way, the "Validate on desktop" and "Validate on Target" are simply calling the Validate command in the core. And finally, when generating the core, it calls the generate function of the CLI.
As you pointed out, X Cube AI is able to generate template code thanks to the cubeMX environment.
The Core generate the code for the model (as you described in your comment), CubeMX generate the code around it to make a use of it.
There is no question like : Should I use the Core or X cube AI, it is, do I just want the model => core, or do I also want some config and template code => X Cube AI (and Core).
The same idea is applied to the ST Developer Cloud, it is another tool, online this time, that work thanks to the ST Edge AI Core.
The ST Model Zoo Services also uses the Core when using the Deployment operation mode.
In one word, every code related to neural network within ST was obtained with the Core (STM32,MP2,STellar etc).
NanoEdge AI Studio is the only exception (to my knowledge). It does not work with the ST Edge AI Core.
I hope it is clearer.
Have a good day,
Julian
2025-09-23 6:17 AM
Hello @Julian E. ,
thanks for the clarification.
I was always under the impression that X-CUBE-AI generates pure C code but after your comment I checked again and now I found the sub-directory which contains the ST Edge AI part including the static library.
I'm wondering why the tool generates a static library instead of *.c/*.h files. Is this a design choice or have I just not found how to do it? Pure C code would be better in certain scenarios because it allows for verification, debugging, static code analysis, etc.
Best regards,
kahuna
2025-09-23 6:33 AM
Hello @kahuna,
It is a design choice. Probably not to share the source code. I don't know the reasoning behind it.
But you did not miss anything, it is indeed like that.
Have a good day,
Julian
2025-09-23 8:48 AM
This is platform-agnostic, and the current CubeMX/X-Cube-AI release doesn’t fully generate STAI APIs yet. What you see generated is still the legacy style.