2025-11-18 8:06 AM
Hello,
I tested the new STM32CubeIDE 2.0 today and was initially confused that CubeMX opened when I double-clicked on the *.ioc file. However, this is listed as a new feature in the release notes.
Unfortunately, this feature completely destroys my projects.
When the code is generated, these settings in the CubeIDE project change:
- Targeted Language changes from C++ to C
- Linked folders are deleted
- Configurations: DEBUG, SYSTEM added
- Linker file settings from own configurations deleted
Did I make a mistake in the settings? Why is the project changed so much?
Best regards,
Jens
Solved! Go to Solution.
2025-11-24 7:09 AM
Hallo @Mahmoud Ben Romdhane ,
so am I right that everything I reported is confirmed and reported?
Best regards,
Jens
2025-11-18 8:34 AM
Hello @JensH ,
First let me thank you for posting.
For more investigation, I suggest that you provide the initial STM32CubeIDE Project created with 1.19.0.
Thanks.
Mahmoud
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.
2025-11-18 1:52 PM
2025-11-18 2:51 PM
You didn’t make a mistake — this is actually a regression in STM32CubeIDE 2.0.
The new feature where double-clicking the .ioc file opens CubeMX inside the IDE is causing CubeMX to overwrite several project settings during code generation.
Until ST releases a fix, the recommended workarounds are:
Regenerate code manually
Using Project → Generate Code instead of opening the .ioc file.
Avoid editing the .ioc in IDE 2.0
Or open the .ioc with external CubeMX (standalone).
Back up the .project and .cproject files
So they can be restored after regeneration.
Hopefully ST will address this in the next update.
And try to use any Version Control in the future for easy back up.
Best regards.
2025-11-19 12:21 AM
This is a big deal!
I don't understand how something like this can happen?
Doesn't anyone test what happens to old projects?
2025-11-19 12:34 AM
Hi Mohamed,
During development, I constantly change the *.ioc file.
I adjust peripheral frequencies or change GPIO configurations, for example.
Before using this workaround, I prefer to stay on version 1.19 and wait for the bug fix.
Best regards
Jens
2025-11-19 1:09 AM
Thanks @JensH for telling us about this feature. I was going to update my Cube IDE, but now I won't update until they fix this bug.
2025-11-19 5:08 AM
2025-11-19 8:25 AM - edited 2025-11-20 3:58 AM
Let me thank you for bringing the issue to our attention.
An internal ticket was submitted to the dedicated team (Internal Ticket Number: Ticket 222143 ).
I will let you know when the issue is fixed.
As workaround, you can point manually to the desired linker file:
and convert the code to C++
Thanks.
Mahmoud
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.
2025-11-20 12:48 AM
Hi,
of course, I know how to restore the links to the linker scripts and switch back to C++.
The problem is that you have to do this every time after changes to the *.ioc file and new code has been generated.
I think the main problem is that CubeMX switches from C++ to C and regenerates the DEBUG and RELEASE configurations.
Best regards
Jens