cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 6.12 deletes user folder

nobody
Associate II

Hi,

 

When I'm generating code with the latest STM32CubeMX 6.12.1 and STM32CubeIDE1.16.0  then sometimes my user folder with the include files were deleted. I don't know yet, why sometimes the folder is not deleted (maybe only small changed in the .ioc file). My Folder is in Middleware\Third_Party\myFolder. 

  • Is there a rule were the user folder are allowed to be?
  • Is it a bug from CubeMX or miss use from my side? (Do I have to do something special when I'm adding a new user folder?)

 

Thanks in advance
nobody

6 REPLIES 6
Ghofrane GSOURI
ST Employee

Hello @nobody 

Answers to your questions :

1- In STM32CubeIDE, there are no strict rules dictating where user folders must be located, but there are best practices and conventions that can help ensure proper organization and functionality of your project.
If you are using middleware components, they should generally reside in the Middlewares directory. Custom user folders can be created here, such as Middlewares/Third_Party/myFolder,
but care should be taken to ensure that the IDE recognizes these paths correctly.

2- Specifying the steps you took to reproduce the issue would be helpful.

Those are the steps that I took using CubeMX 6.12.1 and STM32CubeIDE 1.16.1

through the IDE, right-click on the Third_Party folder in the Project Explorer, select New > Folder, and name it accordingly.

GhofraneGSOURI_0-1732022497042.png

By using CubeMX, I generated the code and the added folder was present.

THX

Ghofrane

 

 

 

SofLit
ST Employee

Hello,

To prevent random file delete, I suggest to use .extSettings file where you can declare your own files:

Example:

 

[ProjectFiles]
[Groups]
Middleware\Third_Party\myFolder= <path to c file 1>;<path to c file 2>;<path to c file 3>
[Others]

 

.extSettings file will be located at the same level as the ioc file.

 

 

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.
nobody
Associate II

Thanks a lot to both of you (@SofLit,@Ghofrane GSOURI)

In the meantime I tried to use the .extSettings File. Where I was not successful. Then I tried also different path types in the .extSettings file. I thought maybe there could be the problem, but the different path types are also not solving my problem. 

nobody_2-1732270718690.png

 

Then I tried to figure out, when my folder were deleted (some times my folders were still there, when I regenerated).

Here is my list what I did:

1. Generate new File Project with CubeMX
2. After Generation imported project into STMide
3. Add Over CubeMX X-CUBE-FREERTOS (adds MiddleWareFolder)
4. Add "myFolder" over Windows Explorer
5. Refresh on IDE
6. Generate new file over IDE (testFile.c and testFile.h)
7. Copy other files over Windows explorer into myFolder
8. Copy folder to test different settings in .extSettings
9. Add files to .extSettings
10. Change something on a middleware library (changed something in freeRTOS)
11. Generate
12. Folders are gone

I think every time when CubeMX has to modify something inside the Middlewares/Third_Party/ it deletes my folders.

nobody_0-1732270430414.pngnobody_1-1732270451546.png

Maybe with the additional information you have another idea, where my problem is. (I added my whole test project)

Thanks a lot
nobody

 

 

Hello @nobody 

Thank you for the sharing.

An internal ticket has been opened to follow up the behavior. Ticket number 196825 (not accessible by the users).

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

Our team is actively investigating the root cause of this behavior. In the interim, we suggest relocating your added files and refraining from placing them in the Middlewares folder, as this directory is specifically intended for files generated by CubeMX.

BR,

Ghofrane

Thanks for investigating.

So your recommendation is not to place something into the Middleware folder.
Is there also a recommendation to not place something into the Drivers and/or Core folder?

Thanks in advance
nobody