cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 6.1.1 is deleting Src folder

Ian Day
Associate III

I saw that this issue was reported back in 4.* days, but I'm experiencing this now with 6.1.1. The Core/Src folder is removed even though Core/Inc files are regenerated.

Is there a version that is known to work?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Ian Day​ 

Thanks for those valuable inputs, I can now reproduce the issue from my side. Actually, re-generating the cubeMX project (that was previously generated with EWARM IDE) while changing the Toolchain/IDE to "Other Tollchains GPDSC", the Src folder is deleted from <Project_Location>\Core directory.

This problem will be reported internally to be fixed. Thanks for your contribution, I will certainly keep you posted with the updates.

As a workaround for this issue, you should first change the Application Structure through Project Manager view > Project tab to Basic before generating code using the EWARM toolchain. Doing the this step will avoid the delete of the Src folder after regeneration.

For more details about the various features of STM32CubeMX, please refer to the User Manual.

Sorry for the inconvenience that this may cause.

Thanks for your patience.

Khouloud.

View solution in original post

9 REPLIES 9

Hello @Ian Day​ ,

Welcome to ST Community 🙂

Thanks for your feedback. Could you please detail more how did you reproduce to get this issue.

Is it similar to the issue reported in this post ?

I'll be waiting for your reply.

Thanks in advance.

Khouloud.

Yes, sounds exactly the same.

Also, have been converting the project from another IDE. First couple of generations it put files in project-root/Src and project-root/Inc. But later it changed to putting them in project-root/Core/Src and project-root/Core/Inc. Any idea why and where is this defined?

Hi @Ian Day​ ,

First let me explain briefly the problem reported  this post: In fact the problem here is that when doing a copy of the whole generated folder, opening the .ioc file of the copied project and generate code. Then backing to origin generated project, the Src file will be deleted. Only the Inc folder remains in <Project_Location>\Core directory.

Actually this issue was reported internally to be fixed. I'll keep you posted with updates.

Sorry for any inconvenience that this may cause.

In case you have reproduced the same scenario and faced the same issue, then here is my workaround to recover the deleted Src folder:

Open the .ioc of origin generated project and re-generate code, the Src folder will be generated again.

> Also, have been converting the project from another IDE.

Do you mean that you are using the same .ioc and you change only the Toolchain/IDE ? Please correct me if I misunderstood.

Your feedback is very helpful to find the root-cause of the issue.

Khouloud.

Yes, we had a contractor in that was using IAR to do some work for us in porting a project, but we wanted to use Visual Studio.

Effectively yes. Created a new project using the VisualGDB wizard, then copied over the ioc file and other bits.

Actually, this may help identify the issue:

We're using VisualGDB of course, and when STM32CubeMX is invoked by VisualGDB, then the Src folder is deleted.

If I run STM32CubeMX manually, load the ioc and generate, the Src folder is fine.

Hi @Ian Day​ 

Thanks for those valuable inputs, I can now reproduce the issue from my side. Actually, re-generating the cubeMX project (that was previously generated with EWARM IDE) while changing the Toolchain/IDE to "Other Tollchains GPDSC", the Src folder is deleted from <Project_Location>\Core directory.

This problem will be reported internally to be fixed. Thanks for your contribution, I will certainly keep you posted with the updates.

As a workaround for this issue, you should first change the Application Structure through Project Manager view > Project tab to Basic before generating code using the EWARM toolchain. Doing the this step will avoid the delete of the Src folder after regeneration.

For more details about the various features of STM32CubeMX, please refer to the User Manual.

Sorry for the inconvenience that this may cause.

Thanks for your patience.

Khouloud.

Hi. That option is disabled and can't be changed.

Yes, it will be disabled after the first generation.

The option can be available again, if you save the project using File > save as :

0693W000008GhfLQAS.jpg 

Then Application Structure can be changed.

GregKN
Associate II

Hello,

i found this thread, because STM32CubeIDE deleted nearly all my src-folders during i try to export my projects into a zip file for backup. Didn't believe it until i found several threads including this one reporting this bug.

Be aware! You only have to open the project and try to export it and you will loose all your .c-files in the src folder. You don't have to recompile or edit the project!

Really a nightmare!

Thanks ST!