on
2025-12-17
12:48 AM
- edited on
2026-01-07
8:48 AM
by
Laurids_PETERSE
STM32CubeIDE 2.0.0 is a major release. In this version, STM32CubeMX is removed from STM32CubeIDE. STM32CubeIDE and STM32CubeMX are now two separate products. This changes the workflow, which we describe and explain in this article. Click here if you would like to watch a video tutorial describing the new workflow.
In STM32CubeIDE1.x, STM32CubeMX was integrated into STM32CubeIDE:
In STM32CubeIDE 2.x, the STM32CubeMX was removed from STM32CubeIDE
The new workflow consists in starting your project from STM32CubeMX, generating a project for STM32CubeIDE and then importing it in STM32CubeIDE.
The steps are described and explained in detail below.
In the example below I have created a STM32CubeMX for a STM32U385 with a demonstration code.
Once your project is completed (Pinout & Configuration and Clock Configuration fully configured), we go to the "Project Manager" tab to set up the project for STM32CubeIDE.
Go to "Project Manager" tab and input the following:
Click on the [GENERATE CODE] icon
Waiting for the project to be generated, you should see the following window once the project has been created successfully.
You can now close the window (click [Close]).
Switch to STM32CubeIDE 2.x and import the project we just created with STM32CubeMX.
Click on [File] → [STM32 Project Create/Import]
A window opens, select [STM32CubeMX/STM32CubeIDE Project] under “Import STM32 Project” and then click [Next] as seen below.
A new window pops up and you give the path of the project you previously created and then click [Finish].
The project is now imported.
We can close the "Information Center" tab if it was opened.
You should see the project on the left side after expanding it:
Now, let's say that we want to modify our existing project in STM32CubeMX.
Go back to STM32CubeMX, and do the modifications you want to do.
For example, let’s say that we want to add a peripheral to our application (in my example, I am enabling I2C1):
Then, generate the code again by clicking [GENERATE CODE].
Note: [GENERATE CODE] will save your project
Once the code is generated, go back to STM32CubeIDE.
To reflect the changes made in the project, you need to “refresh” the project by doing the following:
Click on [File] → [Refresh] or press [F5].
Note: We also wanted to highlight the "auto-refresh" of the STM32CubeIDE file tree:
This is an Eclipse native feature which checks all projects inside the workspace for changes and update the file tree accordingly.
Now your project has been updated to STM32CubeIDE. In my case, for example, I can see the configuration of the I2C1 I just did in STM32CubeMX.
Many thanks to @TDK for providing this information in this thread.
Create the project in STM32CubeMX.
After you open it in STM32CubeIDE, right click the project and select "Convert to C++". This will add the C++ compiler and look for *.cpp files.
Add whatever *.cpp files you want and it'll work. You'll need to extern "C" the ones you call in main.c so the names don't get mangled.
Great.
One of the best things was separating CubeMX and CubeIDE
Thanks!!
I'm looking forward to the workflow using VSCode!!
After I convert the project into C++ Whether the CubeMX will also understand and edit C++ files only or it will create duplicate C files.
Please add this information in the page above so that It can be taken care of at the very beginning of the project
This post so usefull for juniors like me. Could you explain samely for the visual studio ?
Thanks, and best regards :thumbs_up:
In Ubuntu, I found I have to close STM32CubeIDE before running up STM32CubeMX, otherwise the latter just sits there hanging at launch because its waiting for a lock file to be released by STM32CubeIDE.
(Actually I prefer MX being integrated with the IDE, but if it makes ST app maintenance easier I can live with it).
Hi @isikli,
I'm happy to hear this helped you!
A knowledge base article is in progress regarding this topic.
I'll get back to you once it's published and link it here.
Thanks,
Laurids
This is definitiv not a good idea.
I am missing something here... For the first time in ages I tried to create a STM32 project from scratch using this new workflow but I just can't get it to give me a project thats buildable out of the box.
If I look at the Project Properties, under the "Builders" item, there are no builders configured for the project.
In my projects generated under the old integrated method, a project would list the following builders....
for which I could do a Build All to generate a firmware file.
How do I get the new workflow to generate me a buildable project that will result in an STM32 executable I can run on an STM32 board? (I have no idea what "project natures" means).
@Bags can you please enter an online support ticket to us so we can look into this issue in more details? ols.st.com. Please include your stm32cubemx and stm32cubeide project so that we can do a review.
BTW I can't get your "ols.st.com" link to work...."We can't log you in because of an issue with single sign-on. Contact your Salesforce admin for help."
I believe the build issue is due to a hidden file called ".project" being generated by CubeIDE. When following your workflow, there appears to be two ".project" files generated, one sat in a subfolder called "STM32CudeIDE" (that file generated by CubeMX appears to contain all the required settings), and a second ".project" file sat in a parent folder generated by CubeIDE - the contents of this latter file is minimal compared to the other one.
If I delete the minimal ".project" file and clear out my workspace and reload the project it then works as intended.
I just repeated the workflow to replicate the problem I am having....
CubeMX generates the following hidden files...
".mxproject", and a subfolder "STM32CubeIDE" containing hidden files ".cproject", ".project" -- all these appear to be valid contents.
Then running CubeIDE (starting with an empty workspace)... following the described workflow exactly, I browse to the folder containing the MX projects .ioc file.... and click "Finish"...
As a result CubeIDE has now generated a new hidden file ".project" located in the same folder as ".mxproject". However this ".project" file is almost empty...
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>test2</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
As a result there are no builder defined for the imported project.
If I delete this bare ".project" file, clean out my workspace and do my normal "Open Projects from File System..." to reimport the project, it all then works fine.
What was the result of this ST? I've been having the same issue and can't seem to get past it. Why are these projects generating without the ability to build? I've tried this with numerous example projects for the nucleo-u385RG, including the LPUART_WakeUpFromStop. I hit 'generate code' after selecting the STM32CubeIDE toolchain then import it into my workspace, and find no builder available to compile and run the program. The .project file in the main directory is indeed bare. If there are other steps involved please improve this guideline to include them.
Was also completely blindsighted by the removal of cubeMX from the IDE. The project creation wizard appears to take you through all the same steps as before except suddenly there's no option to configure your peripherals and complete the setup. Appreciate the information you've put in this post, but help us notice these changes elsewhere, somehwere a standard user might encounter (ie. a notification in the project creation wizard). I'd say most users aren't accustomed to browsing Release Notes every time they absently click away one of 10 'update me' requests they've had pop up on their screen that day.
Otherwise thanks for the work you do, it's a very useful piece of software.
Bump.
I was using using STM32CubeIDE for many years. I think that I understand the concept of this change from 1.x to 2.x with separated tools but the result is disappointing.
I created a typical template-like project in STM32CubeMX, saved it and successfully imported in STM32CubeIDE. Code looks OK, just like it was in versions 1.x.
However, the "Build all" in "Project" menu is grayed out. There are not builders defined.
Update: I tried again, same or very similar steps and now building is possible. First project was out of workspace defined for IDE2.1.1 and its directory was significantly smaller (was only 4 MB while the second was 18 MB). In my first try the auto-complete (Ctrl+Space) didn't work either.