STM32CubeMX 6.12 deletes user folder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-19 4:58 AM
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
- Labels:
-
STM32CubeMX
-
STM32U5 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-19 5:17 AM - edited ‎2024-11-19 5:26 AM
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.
By using CubeMX, I generated the code and the added folder was present.
THX
Ghofrane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-19 5:17 AM - edited ‎2024-11-19 5:18 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-22 2:20 AM - edited ‎2024-11-22 2:24 AM
Thanks a lot to both of you (@mÆŽALLEm,@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.
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.
Maybe with the additional information you have another idea, where my problem is. (I added my whole test project)
Thanks a lot
nobody
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-22 3:58 AM
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-22 8:41 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-12-01 11:09 PM
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
