cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE, can't compile STM32CubeMX 5.2.0 projects for STM32CubeIDE

Jack3
Senior II

Last Friday I tested STM32CubeIDE 1.0.0.

I used Windows 10, STM32CubeMX 5.2.0 and STM32CubeIDE 1.0.0, and new STM32H7 firmware.

I also tested STM32CubeMX 5.2.0, which now has an option to generate STM32CubeIDE projects, but it actually can't generate valid projects for STM32CubeIDE, right now.

But the integrated STM32CubeMX in STM32CubeIDE can do it.

However these issues came up:

  • I no longer can select "Copy all used libraries into the project folder"
  • I cannot uncheck "Generate Under Root", for STM32CubeIDE it is forced
  • It no longer seems to be able to create virtual files (as we could with TrueStudio "New File -> Advanced -> Link to file in the file system")

  

5 REPLIES 5
Markus GIRDLAND
ST Employee

Some of this seems related to CubeMX standalone which I'm not really that knowledgeable of.

I will try to answer what I can and I have already sent questions to the MX team of the things I don't have an answer for and I'll update as soon as I know.

I'll try to split it up into manageable questions.

I no longer can select "Copy all used libraries into the project folder"

I don't know about this setting, asked MX team and will update you when I know.

I cannot uncheck the "Generate Under Root", for STM32CubeIDE it is forced"

This is a deliberate design decision caused by the integration of CubeMX into CubeIDE. 

The reason is that it should be possible to put all project files, including the CubeMX files, under version control by an integrated git client.

It no longer seems to be able to create virtual files"

This is an unfortunate consequence of the above. Although this is a good point, we will keep having discussions about this topic with this consequence in mind.

The last three issues you run into I can not reproduce so I could use some additional descriptions of how I can for example generate a project with the compile button grayed out.

I ran into similar issues that you describe until I got pointed out to me that I used 32 bit Java and CubeMX standalone required 64 bit, perhaps this is the case for you as well?

Jack3
Senior II

About Java reports it is Version 8 Update 201. It does not mention how many bits.

After I updated Java to Version 8 Update 211, I no longer can import and compile existing TrueStudio projects, as when it needs to convert it, comes with the error "Fail create backup of project files before conversion".

I'm pretty sure that's a 32 bit version. You can make sure by going to a command prompt and using the command:

java -version

Unless it explicitly says it's 64-Bit then it's 32.

Please do the following:

  1. Uninstall CubeMX
  2. Uninstall Java
  3. Install Java 64 bit (Windows offline (64 bit)) here: https://www.java.com/en/download/manual.jsp
  4. Install CubeMX

After this, please give it a new try and see if you're still experiencing these issues.

Thanks! I followed the steps to upgrade Java to 64-bit.

This version didn't improve the behavior.

I found it is best to generate projects from within the integrated CubeMX.

For all current TrueSTudio projects, I best keep using TrueStudio.

For future projects we have a choice

One good thing of CubeIDE is it takes changed header files into account while compiling, something TrueStudio is not capable of. That's great!

Compiling takes a bit longer on the other hand (all threads enabled).

It would be nice if TrueStudio projects which use virtual files and folders can be converted for STM32CubeIDE, so that they no longer use virtual files and folders, and also get rid of the TrueStudio sub-directory .

I may need to write a python script to do so.

Cartu38 OpenDev
Lead II

Hello Jack,

For my understanding (I'm STM32 newbie) please could you share what is helping you unchecking "Generate Under Root" option ? Sounds not so obvious to me as first guess result is quite more complex to me as relying on some links usage etc. Just starting I'm looking for pro & cons from experienced guys.

Thanks for your inputs about.

Br,

Cartu38