cancel
Showing results for 
Search instead for 
Did you mean: 

Can we load and run inference an AI model from Cortex M33 of STM32MP257-DK?

Santosh-Italiya
Associate II

Hello,

I am trying to create a project from STMcubeIDE (v1.16.1) for STM32MP257-DK and would like to load a .tflite model on Cortex M33 and run inference to the model. However, when I was creating the project, I brows to my test model from the .ioc file and when I tried to Analyze, It throws the "stm32mp2 component is not available, please install" error. I double checked that the stm32mp2 is already installed. Can anyone please let me know if I am missing anything here. Below are the images for error logs and stm32mp2 installed image.

Error image:

Screenshot 2025-03-10 141851.png

stm32mp2 installed image:

Screenshot 2025-03-10 142223.png

Thank you.

 

5 REPLIES 5
Pwxn
ST Employee

Hello @Santosh-Italiya 

It's seems you are using ST Edge AI Core analyze command here.

As is it state in this wiki page :

"The analyze commands in ST Edge AI for STM32MPUs are currently under development and will be available in a future release."

 

I recommend you to use generate command to convert your TFlite model to a network binary graph (NBG) and use the validate command to run an inference on your board to obtain different metrics. 

I also recommend to take a look at the X-LINUX-AI expansion package wiki page if you didn't have done it yet to see if this package can fit your needs. 

 

Regards,

Santosh-Italiya
Associate II

Hey @Pwxn 

Thanks for your quick reply. I have referred to the documents you have mentioned and few others to check for any workarounds. As I mentioned in the post, I want to load a .tflite model on Cortex M33 and run inference to the model, so is it currently possible to load and run inference on the Cortex-M33 only for the STM32MP257-DK. If so, could you provide the recommended procedure and any relevant documentation or point me to right direction? If not, is there an alternative approach or timeline for STM32Cube.AI support on STM32MP257-DK?

 

Thank you.

 

VABRI
ST Employee

Dear @Santosh-Italiya ,

The STedgeAI stm32mp2 target is referering to the cortexA with Linux ecosystem. The analyse is not yet supported for this stm32mp2 (Linux cortexA) target.

To generate a code for cortexM33 of the STM32MP2 the trick consists in creating a code for a STM32 cortexM33 target and to port the resulting AI code into a STM32MP2 cortexM33 project.

The native support of the CortexM33 is not yet available.

BR

Vincent

​
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.

Hello @VABRI 
Can you please elaborate more on "port the resulting AI code into a STM32MP2 cortexM33 project". I am not sure what do you mean (specifically AI code).

Thank you

Pwxn
ST Employee

Hello @Santosh-Italiya 

 

For example, you can use NanoEdge AI studio to generate M33 AI code.

Using NanoEdge AI Studio while targeting for an stm32H5 for example will generate M33 code that you can implement in your MP2 M33 firmware. 


Regards,