Skip to main content
Explorer
June 25, 2025
Solved

STM32CubeIDE 1.18.1 removes middleware folder after re-generating

  • June 25, 2025
  • 1 reply
  • 342 views

Hi.

I add the "x-cube-eeprom-v8-0-0" library to my project manually:

I create folder Middlewares and copy sources the  folder as expected,

I specify the paths in the project settings,

I uncheck the "Delete previously generated files when not re-generated" on the Project Manager tab in Device Configuration Tool,

but the folder is still deleted when regenerating after changing the any settings in ioc.

What am I doing wrong?

Best answer by Ghofrane GSOURI

Hello @Foregit 

CubeMX strictly manages certain folders like Middlewares, Src, Inc, etc.

During regeneration, CubeMX cleans up files and folders inside these managed directories that it does not recognize as part of the generated project.

I recommend you to rename your folder and move it  outside  Middlewares.

YourProject/
 MyMiddlewares/
 x-cube-eeprom-v8-0-0/ <-- safe 

 

THX

Ghofrane

1 reply

Ghofrane GSOURI
Ghofrane GSOURIBest answer
Technical Moderator
June 25, 2025

Hello @Foregit 

CubeMX strictly manages certain folders like Middlewares, Src, Inc, etc.

During regeneration, CubeMX cleans up files and folders inside these managed directories that it does not recognize as part of the generated project.

I recommend you to rename your folder and move it  outside  Middlewares.

YourProject/
 MyMiddlewares/
 x-cube-eeprom-v8-0-0/ <-- safe 

 

THX

Ghofrane

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.