2020-07-28 04:58 PM
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.
Solved! Go to Solution.
2020-07-29 09:38 AM
@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 ....
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 !
2020-07-29 09:44 AM
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.
2020-07-29 09:50 AM
@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 ?
2020-07-29 09:57 AM
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.
2020-07-29 11:01 AM
Ok. Have you within your original project some 'Utilities' folder prior asking to update ?
2020-07-29 11:13 AM
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
2020-07-29 11:21 AM
Are we arriving to a point where it make sense to perform daily manual zip of the project folder prior to CubeIDE launch?
2020-07-29 02:28 PM
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
2020-07-30 01:40 AM
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.
2020-07-30 01:56 AM
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.
/Alexandre