cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE - CubeMX deletes project

AWies.1
Associate III

I am trying to use STM32CubeIDE 1.4.0. Previously I was using 1.3.0. I was calling the CubeMX, since I wanted to make a change to the configuration. When CubeMX generated the update code, it deleted the entire project. No traces of the project are left, except for the root directory and and an empty directory "Drivers/CMSIS". Why is this happening? Forunately, I made a backup just before I did this, otherwise my entire project would have been gone.

42 REPLIES 42

@AWies.1​ good and bad news ... I'm able to reproduce and confirm your issue.

Based on your .ioc file if 1.3.1 project is generated fine.

Moving then to 1.4.0 and asking for project update from device configuration tool is performing almost full project removal :o :sad_but_relieved_face:

Not mastering such enough but sounds related to the fact your're using TouchGFX pack. Device configuration tool is claiming 4.13 is not supported. have to migrate to 4.14 ....

0693W000003BeciQAC.jpg

0693W000003BedlQAC.jpg

0693W000003BedvQAC.jpg

I've not tried but maybe taking care of some migration option is doing proper job ? @Martin KJELDSEN​ @Alexandre RENOUX​ @Romain DIELEMAN​ TouchGFX experts please help here !

0693W000003Bef3QAC.jpg

Ingmar
Associate II

I have a similar observation (CubeIDE 1.3.1). In a running project, I wanted to add freeRTOS and started Code generation.

After that, the whole folder Core/Src was deleted, and therefore main.c.

@Ingmar Pätzold​  comment not clear to me.

Do you mean you have a running 1.3.1 project. Then moving to 1.4.0 facing unexpected data removal despite no TouchGFX involved but "only" RTOS ?

No, the 1.3.1 is just for the researcher's information which IDE I am running.

With "similar" I refer to the TO's first post: Folders are deleted when MX starts generating code.

In my situation, I already have a project without RTOS, just plain GPIOs, Timers etc. Editing the .ioc-file with MX (inside CubeIDE) used to be fine.

Now, I wanted to enable the RTOS middleware, so I enabled freeRTOS and set a timer as SYS timebase.

When clicking on "save" and beeing asked whether I want to generate code (yes), main.c is lost (and the whole Core/Src folder).

I strongly assume that this is not what's intended. Obviously, the projects does not build any more.

I tried twice.

I now tried to set up a new project, re-using the old .ioc-file. This time, it does not delete the folder.

Ok. Have you within your original project some 'Utilities' folder prior asking to update ?

Let's try to disable JPEG multimedia and you are saving your project.

I agree such is not a solution anyway ...

Doing such is disabling 'Utilities' folder usage which sounds be root issue source

0693W000003Bf2lQAC.jpg

S.Ma
Principal

Are we arriving to a point where it make sense to perform daily manual zip of the project folder prior to CubeIDE launch?

Pavel A.
Evangelist III

Just use version control for anything valuable.

Check in the generated files too. This allows tracking and validating any changes.

Yes, CubeIDE could make automatic backup before regenerating projects - but who likes extra work?

-- pa

No utilites such as JPEG or touchGFX, no update request of a subsystem.

I don't know whether the two issues are related. Maybe for some CubeIDE maintainer it might be another hint, since I am still the opinion that code generators should never remove user code.

BTW: With setting up a fresh project and copying my code over, the problem is solved for me. Still not satisfying, so I am warned to commit my code every time I start MX.

Hello,

I manage to reproduce the issue. I don't know why it happened but what works is the following.

Use CubeMX and CubeIDE separately.

  • Open the .ioc file with CubeMX 6.0.0 and migrate the project
  • At that moment, the TouchGFX Generator is not updated, and you are using the old 4.13 version that is not compatible with CubeMX 6.0.0. If you generate at that moment, you will not have your project deleted, but you will probably have some compiling error afterwards.
  • So before generating, as shown by @Cartu38 OpenDev​ in the previous message, update to version 4.14.
  • Then generate code with CubeMX
  • Open your .touchgfx file with TouchGFX Designer 4.14 and generate code
  • Open .project file with CubeIDE 1.4.0
  • Build and debug (This should work)

/Alexandre