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

1 ACCEPTED SOLUTION

Accepted Solutions
fauvarque.daniel
ST Employee

Recent versions of STM32CubeMX, and STM32CubeIDE with the embedded STM32CubeMX, delete the Middleware files required by X-CUBE-AI upon regeneration.

A fix/workaround has been implemented in X-CUBE-AI 8.1 that will be released by mid june.

In the mean time one possible workaround is to uncheck the checkbox "Delete the previously generated files when no re-generated" in the Project Manager -> Code Generator -> Generated files panel

Regards


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.

View solution in original post

16 REPLIES 16
fauvarque.daniel
ST Employee

Recent versions of STM32CubeMX, and STM32CubeIDE with the embedded STM32CubeMX, delete the Middleware files required by X-CUBE-AI upon regeneration.

A fix/workaround has been implemented in X-CUBE-AI 8.1 that will be released by mid june.

In the mean time one possible workaround is to uncheck the checkbox "Delete the previously generated files when no re-generated" in the Project Manager -> Code Generator -> Generated files panel

Regards


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,

The workaround doesn't work for me :sad_but_relieved_face:

I'm running xCube-AI V8.0.1 (it seems that 8.1 is still not released...) on STM32CubeIDE V1.12.1

I do see Middlewares created and then deleted during code generation.

For now, I just copied from repository

STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\8.0.1\Middlewares\ST\AI\Inc

It compiles, but only after I removed ':NetworkRuntime801_CM4_GCC.a' from Project/Properties/C/C++ General/Paths and Symbols/Libraries.

Only problem: I need to recopy Middlewares and remove the wrong library each time I do regenerate!

When can we expect to have the XCube AI V8.1 released?

Thanks

Jylo

Hello,

I see that v8.1 was released and I am trying to import it into STMCubeMx, but it doesn't appear to be a recognized/available package.

I manually installed it off the ST website and see it being recognized by the package manager

8a2599e9-0a05-4689-9ac0-bfce519d5391.jpg

But, it is not available for project configuration

6cf4532b-ed2a-42c9-8335-e0c7b6ad6a0c.jpg

Is there a step I am missing here?

Thanks!

I have exact the same problem. Did you solve it yet. If so, can you describe your solution.

JLojo
Associate III

Hi Guray1

As described above, just:

  • Copy from the repository STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\8.0.1\Middlewares\ST\AI\Inc to your workspace.
  • Remove ':NetworkRuntime801_CM4_GCC.a' from Project/Properties/C/C++ General/Paths and Symbols/Libraries.

Only problem: you need to redo this each time you regenerate!

eduardo_reis
Associate III

It's unbelievable how much time this issue can take from us.

In my case, it worked fine for the first time I used the AI module for my project. However, when creating another project from scratch, it no longer worked. I even tried to remove it from the entire STM32 and reinstall it. It did not work either.

 

Here is a weird behavior. When enabling the AI sub module in my project, it already comes with the configuration used before, as if I had already imported the model to that brand new project started from scratch. This is definitely not a feature, but a bug.

I am still struggling with this and any help is appreciated.

What would be the equivalent of finding `Project Manager -> Code Generator -> Generated files panel` in the STM32CubeIDE mentioned in @fauvarque.daniel's answer?

fauvarque.daniel
ST Employee

Are you using version X-Cube-AI 8.1 ? normally the problem of code generation has been fixed in that version (It is actually a workaround to recreate the files that are removed during the code generation by MX and should not)

Concerning your issue of having an already configured network when you start from scratch, the only feature I can think of is the AI filter in the finder, if you pass a network in the AI filter of the finder when the project is created the name of the network used is recovered so you don't have to type it twice.

Regards


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.
eduardo_reis
Associate III

I am using `X-Cube-AI 8.1` and `STMCubeIDE 1.13.1`. I even reinstalled the IDE following these steps and I still have the problem. A coworker tried on his machines the exact same steps, and things work fine on his computer. The only difference we know of is that I am on a ubuntu machine, and the other machine we are using that works is windows.

Also, important to remember that for that first project I mentioned, the Middleware folder was added fine. But any other project, the folder gets removed. Right now removed all projects from the workspace, and any new project I create, I still have the issue. :slightly_frowning_face:

I'll try to reproduce on Linux.

Do you have a TMPAILIB directory created ? if so you can move the content into Middlewares/ST/AI to restore the files that have been removed by MX


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.