2024-11-19 04: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.
Thanks in advance
nobody
2024-11-19 05:17 AM - edited 2024-11-19 05: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
2024-11-19 05:17 AM - edited 2024-11-19 05: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.
2024-11-22 02:20 AM - edited 2024-11-22 02:24 AM
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.
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
2024-11-22 03: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).
2024-11-22 08: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