Skip to main content
MShak
Associate
October 2, 2019
Question

Why STM32CubeMX failed to generate a project for STM32CubeIDE?

  • October 2, 2019
  • 29 replies
  • 10059 views

..

This topic has been closed for replies.

29 replies

markof9f
Visitor II
October 16, 2019

I am sorry to hear that MCSDK project still doesn't generate properly.

I don't need it right now, but I plan to use it in the future. Hope they will fix those issues.

DMatt.2
Associate
October 19, 2019

I've not had any problem with the CubeMX code generator, just the MCworkbench. I found in another community thread that the X-Cube-MCSDK release notes specificially say that the MCWorkbench code generator does not work for the CubeIDE, (yet), but that there is a work around, steps are listed in the release notes on page10. I also found that all of my trial and error testing had somehow corrupted my ST workspace, (all of the %USER%/.* folders). The steps described in the release notes worked for me after I created an entirely new user account. I then went back and deleted all of the ST %USER%/.* folders and re-installed everything, and the release notes procedure work in the sense that the software compiled and ran on the target. I believe any JRE 8 version later than 1.8.45 will work. I'm using something like 1.8.97.

DGome
Associate II
October 19, 2019

I finally got CubeMX to generate correct code for CubeIDE that builds without errors!

I noticed 'recommended' firmware package selected was an older one, so tried V1.11.0 as shown and voila !. The problems I was having prior to this was missing files, but this package seemed to resolve CubeIDE build issues.

Now, onward!!

0690X00000AqZkIQAV.png

markof9f
Visitor II
October 20, 2019

Hello @DGome​ ,

I am glad CubeMX finally works for you. Just wondering, how do you get that screen? I don't have Project generation window in my STM32CubeMX v5.4

CLee.0
Associate III
October 25, 2019

I have the same problem:

Toolchain Settings: Please install STM32Cube IDE toolchain to open the project.

Or associate the file type of the project with your Toolchain in System Default Program Settings.

But I definitely already have STM32Cube IDE installed, and it works on its own.

When I 'Generate Code' it produces the .mxproject file and the .ioc file, but it does not produce the  .project and .cproject files.

Sounds like there's no fix for this?

CLee.0
Associate III
October 29, 2019

FYI for you guys, I was able to fix this issue by installing java 64-bit runtime (as opposed to 32 bit). If your Cube IDE is complaining about a Java version, that could be it.

Nesrine.JLASSI
Visitor II
October 29, 2019

​Hello @markof9f​ 

Please try with STM32CubeMX V 5.4.0.

Best regards,

Nesrine

GAusf.1
Visitor II
January 24, 2020

​Hello. I've installed the latest CubeMX and CubeIDE versions, 5.5.0 and 1.2.0 respectively and I have the same issue. If I use MX to generate a CubeIDE project, it says the same error message as indicated in other posts above, "Toolchain Settings: Please install STM32Cube IDE toolchain to open the project. Or associate the file type of the project with your Toolchain in System Default Program Settings." Should I revert back to 5.4.0 for CubeMX to fix the problem?

Thanks,

Gabe

markof9f
Visitor II
January 24, 2020

Do you have both .project and .cproject files generated?

GAusf.1
Visitor II
January 24, 2020

Only a .mxproject and .ioc file ​is created. I don't see any .project or .cproject. If I use the IDE to create the .ioc, I am unable to point the project to the correct firmware location, so I can't win in that direction either.

markof9f
Visitor II
January 26, 2020

I just tried to generate a STM32CubeIDE project from STM32CubeMX v5.5.0 and it doesn't work. Files .project and .cproject are missing again. That was the problem in STM32CubeMX version 5.3.0, they corrected it in version 5.4.0 but apparently it is back in 5.5.0. We should report it as a bug and hopefully they will fix it again in some future version.

markof9f
Visitor II
January 29, 2020

It can be, but I don't think CubeIDE matters. I tried without CubeIDE installed and after that I tried with CubeIDE v1.2.0 and v1.2.1, and it always worked. The problem was present only when I upgraded STM32CubeMX from v5.4.0 to v5.5.0. I did upgrade on two computers, and on both it stopped generating .project and .cproject files, but when I did a clean install of STM32CubeMX v5.5.0 (downloaded from ST website) everything worked well, with or without STM32CubeIDE. My guess is that it has something to do with mismatch of 32-bit and 64-bit versions. My old (upgraded) CubeMX was 32-bit program installed in 'C:\Program Files (x86)\STMicroelectronics' folder, but the new one (fresh install) is 64-bit version installed in 'C:\Program Files\STMicroelectronics'.

I uninstalled both STM32CubeMX and STM32CubeIDE, then I manually deleted 'STMicroelectronics' folder in both 'C:\Program Files (x86)' and 'C:\Program Files' and performed new install of both programs. After that I have them both in 'C:\Program Files' and everything seem to work Ok. I am not sure if my assumption is correct and I don't know if this works for everyone, but it worked for me.