cancel
Showing results for 
Search instead for 
Did you mean: 

Using C code from Cube.AI into Arduino IDE

LuizF_Ferro
Associate III

Hello,

I am working on an AI model that I want to deploy on a board with a STM32U5 Series MCU (it's not an ST board). I'm using Cube.AI to convert my .h5 model into C code, but deploying the model on my board has been quite complicated, as I'm not really experienced with Cube IDE and I see some compatibility limitations between my board features and this IDE.

I've been using Arduino IDE to run some other projects on my board, including AI projects based on Nano Edge, I judge it to be easier because I already have libraries for the respective sensors that I'm using.

 

In this scenario, I'm trying to use the C code generated by Cube AI as a library on Arduino IDE. I have structured the folder accordingly to Arduino formats, but in any case, I am still facing some issues related to compiler flags, or some errors due to different reasons. I'm a bit clueless about how to proceed, since the "solutions" I see from here would require me modifying some of the files generated by Cube AI, and I think that's an approach I should avoid.

 

Therefore, I'm here because I just want to confirm if it's really possible to do this approach of taking the C files from Cube AI and using them as library in Arduino IDE. Is there any compatibility issue that I should be aware of or any modification that I should take into account when developing my project? Thank you!

2 REPLIES 2
Andrew Neil
Evangelist III

@LuizF_Ferro wrote:

 I see some compatibility limitations between my board features and this IDE.


What do you mean by that?

The IDE just creates code to run inside the microcontroller - it really make no difference to the IDE what board the chip is on.

The IDE's code can run on any board.

 

Hello Andrew,

I'm sorry, I actually didn't expressed myself correctly. My point of choosing Arduino instead of STM Cube IDE is just for a matter of convenience: I have some libraries included in Arduino that would require some work for me to actually integrate them into a project in Cube IDE.

Since I'm not really experienced with the second, my goal is to develop my project on Arduino IDE using the codes generated from Cube AI, and that's what I wanted to confirm if it's possible.