cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE does not emit the X-CUBE-AI middleware

PB1
Associate III

I am using STM32CubeIDE v1.12.1 on macOS. I have noticed that, when I import a project generated with STM32Cube.AI Developer Cloud, whenever I open the IOC and make a change to the device configuration that requires to regenerate the code, the project becomes broken. I therefore did an experiment: I created a STM32 project under the IDE, then I enabled the X-CUBE-AI software package in the device configuration tool and I let the IDE generate the code. Apparently the IDE-generated code is missing the $PROJECT/Middlewares/ST/AI subdirectory with the X-CUBE-AI library and headers. I have the same effect with 8.0.0 and 8.0.1 versions of X-CUBE-AI. How do I work around this issue?

Best,

Pietro

16 REPLIES 16
eduardo_reis
Senior

I don't have `TMPAILIB`. Here is what I have.

 

Screenshot from 2024-01-16 09-49-46.pngAlso, Notice that the `.ioc` is show as not saved. I did save it.

 

What happens is: After I save it, the options to regenerate code appear, then I click o regenerate, then after regeneration is done, the `*` is shown again in the `.ioc` tab as if I had changed the file. Then, if I try to close it, it will ask me again if I want to regenerate. Then, the loop continues.

wg
Associate II

Have you solved the same problem I encountered?

Nops. A workaround solution is to manually copy the files. However, it did get deleted when regenerating code. So, you might want to have a script to copy those files that is automatically called when regenerating. For the time being that is what I can think of.

I encountered the same issue and was able to resolve it by selecting "Add necessary library files as referenced in the toolchain project configuration file" in the Project Manager in addition to unchecking "Delete previously generated files when not re-generated".

This was on Ubuntu 22.04 with STM32CubeIDE Version: 1.14.0 and X-CUBE-AI version 8.1.0

Thank you sir! It's worked

Thanks for this, it seems this is still needed with STM32CubeIDE Version 1.15.0, X-CUBE-AI version 9.0.0 and STM32CubeMX version 6.11.0.

LeonTerl
Associate II

Hi, you probably don't need the answer anymore, but I found out that the middleware files are correctly generated and included if you select the application template while including the cube-ai.

LeonTerl_0-1717066420145.png

LeonTerl_1-1717066431762.png

So for anyone who is trying to work with versions post 5.0.0, this is how you fix your middlewares problem.