Skip to main content
AWies.1
Associate III
July 28, 2020
Solved

STM32CubeIDE - CubeMX deletes project

  • July 28, 2020
  • 8 replies
  • 7990 views

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.

This topic has been closed for replies.
Best answer by vincent_grenet

Dear ST community,

Starting right now a 1.4.1 STM32CubeIDE release is available to you.

Please, at least if using 1.4.0 release right now, update to 1.4.1 relying on “Help > Check for Updates�?. You should even have been notified about.

Such minor 1.4.1 patch (some Kbytes) is solving issue reported by this topic.

We really apologize for inconvenience.

Issue was triggered according very specific conditions but as issue result is severe, I would back strongly advise you to update to 1.4.1 in any case shortly.

We have fixed issue and done a full review of our code preventing this kind of trouble to happen back.

Such quick fix has only been possible Thanks to your shared material helping us to dig into shortly. We really appreciate and encourage you to share, if possible, each time you have a support request whatever it is (help request, bug suspicion, …).

We are committed to best service to you all.

8 replies

Cartu38 OpenDev
Graduate II
July 29, 2020

Possibly share our project or at least .ioc file to give a chance to help you ...

Tesla DeLorean
Guru
July 29, 2020

Should be pretty apparent to the devs where they are deleting everything, surely​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Cartu38 OpenDev
Graduate II
July 29, 2020

Except nobody complains any more about since 1.1.0 release if looking at such forum activity.

@Community member​ I appreciate a lot your contributions to such community but takes care to not just kill it posting this kind of unfair comments ... over past days you've done for free too much bad comments ...Since these posts have best answer pointing only end user miss usage ... 

Takes care ... helping is good, crying wolf damages the credibility

I'm still waiting from Keil or IAR some device configuration solution etc. ... ST is promoting a lot for free. Then as any software some bugs exist for sure ... not claiming at all ST proposal is best in class but I consider offer not so bad being fair.

JMald.1
Visitor II
July 29, 2020

I updated today from CubeIDE 1.3.1 to 1.4.0 to find that everytime I do (Ctrl+S -> Generate code) in CubeMX, my project is removed from the project list and everything inside the project is deleted. In the project folder there only left the "Drivers/CMSIS" empty directory and the .mxproject.

Removing the current CubeIDE installation and installing the new one (1.4.0) from scratch gives the same problem. Then I went back to 1.3.0 (1.3.1 isn't available to be donwloaded) and had to undo the .ioc changes made from 1.3.0 to 1.3.1 in order to be able to open them. (With 1.3.0 the project isn't deleted when generating code from CubeMC)

In the attached zip file you can find the last lines of .ide.log on which I can only see two errors:

  • 2020-07-29 11:17:05,438 [ERROR] IPConfigManager:1435 - ERROR: the RefConfig ADC_InternalChannelConfig is not available in your config.xml file
  • 2020-07-29 11:17:15,821 [ERROR] root:60 - Project update internal error. Project update process issue: Project is required

It's weird the log stops with the lines:

  • 2020-07-29 11:17:15,824 [INFO] ProjectBuilder:2044 - Time for Copy CMSIS : 0mS.
  • 2020-07-29 11:17:15,825 [INFO] ProjectBuilder:2044 - Time for Copy CMSIS : 0mS.

That could be the explanation of the empty folder "Drivers/CMSIS". When it's supposed to reconstruct the whole project, but it stops there.

There is also included the full .log file where there are some exceptions related to the "Device Configuration Tool Decorator" and another one being unable to create a linked resource because a folder does not exist. (I made sure the folder exists befor Generating the code in CubeMX)

I'll stick to 1.3.0 until someone finds out what's causing this problem.

Cartu38 OpenDev
Graduate II
July 29, 2020

Still possibly share .ioc file too ... without not possible to get a try to reproduce

JMald.1
Visitor II
July 29, 2020

Thank you very much for your help. If I create a new project using the .ioc file, it compiles fine and it doesn't gets deleted when the code is generated from CubeMX. So it has to be something related to the project.

AWies.1
AWies.1Author
Associate III
July 29, 2020

This is my .ioc file. I was created with CubeMX 5.6.1. I am not sure how helpful it is, since it works fine with 1.3.0.

One comment: My wife is working as software QA manager, and in any company she worked for this would be a priority zero bug, which blocks the release of the product. Customer data must not be corrupted or deleted. Period. If I was ST, I would revoke the release of 1.4.0 until this bug is fixed.

Alex

Cartu38 OpenDev
Graduate II
July 29, 2020

Thanks for sharing I will have a try and such sharing will help ST I guess to confirm issue or not.

Despite not paied by ST I'm thinking if known bug ST would have not done the release public.

I'm sorry to say without bug software would not be software ... As far as I may know Apple, Microsoft, Google, Linux communities, ...even Boeing despite I guess drastic validation .... all are relasing product with bugs.

Myself I'm not able to advice anybodyy how to get 100% coverage doing validation ...

Happy if company your wife is working for is able to ... hoping you are shareholder of you're going to be a rich man !

Cartu38 OpenDev
Graduate II
July 29, 2020

@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
July 29, 2020

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.

Cartu38 OpenDev
Graduate II
July 29, 2020

@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 ?

Ingmar
Associate II
July 29, 2020

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.

S.Ma
Principal
July 29, 2020

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.
July 29, 2020

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

ST Employee
July 30, 2020

Dear ST community. Thanks your feedbacks I'm able to confirm I have identified an issue.

I'm able to reproduce. A fix should be provided as soon as possible. We are working on.

Definitively apologize for inconvenience.

Issue is triggered within very specific configuration. Based on shared material (many Thanks for that … without such sharing no chance to have done related analysis), both projects are existing already projects relying on some Utilities usage as pointed by @Cartu38 OpenDev​ what's issue root source.

I'll keep you up to date obviously.

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.
vincent_grenetBest answer
ST Employee
July 31, 2020

Dear ST community,

Starting right now a 1.4.1 STM32CubeIDE release is available to you.

Please, at least if using 1.4.0 release right now, update to 1.4.1 relying on “Help > Check for Updates�?. You should even have been notified about.

Such minor 1.4.1 patch (some Kbytes) is solving issue reported by this topic.

We really apologize for inconvenience.

Issue was triggered according very specific conditions but as issue result is severe, I would back strongly advise you to update to 1.4.1 in any case shortly.

We have fixed issue and done a full review of our code preventing this kind of trouble to happen back.

Such quick fix has only been possible Thanks to your shared material helping us to dig into shortly. We really appreciate and encourage you to share, if possible, each time you have a support request whatever it is (help request, bug suspicion, …).

We are committed to best service to you all.

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.
dungeonlords789
Associate III
August 4, 2020

0693W000003C9XoQAK.png[Bug]

I have got problem with CubeIDE 1.41 on Windows. CubeIDE sometimes delete \Core\Src folder of projects. I often delete projects from IDE but never check Delete project content on disk. After deleting I am copy project with new folder name, open it on IDE and rename. This is my simplest control version system. The joke is that I can build and debug project without \Core\Src. Before project Clear of cause...

Also there is problem with slash direction. I usually use CubeIDE on Ubuntu, but sometime on Windows.

@Florent V​ 

Cartu38 OpenDev
Graduate II
August 5, 2020

'/' is all OSes supported as path separator.

'\' is Windows only supported as path separator.

dungeonlords789
Associate III
August 5, 2020

try to open your windows CubeIDE proj on Ubuntu. Not so simple.