cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE 2.0 detached STM32CubeMX problem

JensH
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
JensH
Associate III

Hallo @Mahmoud Ben Romdhane ,

so am I right that everything I reported is confirmed and reported?

  1. Targeted language changes from C++ to C
  2. Linker file settings from own configurations deleted (because of switching from C++ to C)
  3. Configurations: DEBUG, SYSTEM added
  4. Variable linked folders are deleted

Best regards,

Jens

View solution in original post

14 REPLIES 14
Mahmoud Ben Romdhane
ST Employee

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.

JensH
Associate III

Hi Mahmoud,

I added the two projects.

One is generated with 1.19 and the other one is regenereated with 2.0.

 

Best regards

Jens

__Mohamed__Ayman__Dev
Associate II

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:

  1. Regenerate code manually
    Using Project → Generate Code instead of opening the .ioc file.

  2. Avoid editing the .ioc in IDE 2.0
    Or open the .ioc with external CubeMX (standalone).

  3. 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.

jd5
Associate

This is a big deal! 

I don't understand how something like this can happen?
Doesn't anyone test what happens to old projects?

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

MGogr.1
Associate III

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.

Hello @JensH @MGogr.1 @jd5 ,

 

I am currently investigation this issue and I will get back to you as soon as possible.

 

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.

Hello @JensH @MGogr.1 @jd5 ,

 

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:

MahmoudBenRomdhane_0-1763569388045.png

and convert the code to C++

MahmoudBenRomdhane_1-1763569526750.png

 

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.

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