Skip to main content
Associate
July 26, 2023
Question

CubeMx version v6.9.0 deleting my folder structure/ Middleware

  • July 26, 2023
  • 8 replies
  • 4961 views

CubeMx version v6.9.0 deleting my folder structure/ Middleware.

I tried to generate code via v6.9.0 and it just deletes my entire middleware files. My all commits are gone. 

 

 

 

8 replies

KDJEM.1
Technical Moderator
August 2, 2023

Hello @Aanchal and welcome to the community :),

Which toolchain/IDE are you using for generation project? Are you using MDK-ARM?

Could you please download and use the latest version of STM32CubeMX6.9.1

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Kaouthar

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.
AanchalAuthor
Associate
August 3, 2023

No the issue is not resolved facing issue related to this file #include "cmsis_os2.h".

../Drivers/VVG_OS\VVG_OS_Thread.h(10): error: 'cmsis_os2.h' file not found

KDJEM.1
Technical Moderator
August 3, 2023

Hi @Aanchal ,

Could you please precise:

-Which toolchain/IDE are you using for generation project?

-Which STM32 product are you using?

Thank you.

Kaouthar

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.
AanchalAuthor
Associate
August 3, 2023

-Which toolchain/IDE are you using for generation project? - i am using keil version 5

-Which STM32 product are you using? - stm32wl55cc

KDJEM.1
Technical Moderator
August 4, 2023

Hello @Aanchal ,

I made some test with STM32WL55CCU6 using STM32CubeMX6.9.1 and I can't reproduce the issue.

Please make sure that after adding the user file in your project generated by Keil, to  click on File--> save all ( this step is very important ) then when you regenerate the code using STM32CubeMX 6.9.1 the added user file will not be deleted .

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Thank you.

Kaouthar

 

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.
Associate II
August 25, 2023

Hello @KDJEM.1 ,

i have the same problem since several versions of STM32CubeIDE. At the moment I'm using version 1.13.1 and the problem ist still there.

I'm using a H743ZG with RTOS activated. In the automatically generated Folder "/Middlewares/" I added some linked folders and they are not deleted. But I also added a Folder named "System" and this folder is always deleted if I regenerate the code.

There should be two internal Tickets: 147368, 151040. Could you reproduce the issue.

Best regards

Jens

KDJEM.1
Technical Moderator
August 25, 2023

Hello @JensH ,

147368 ticket reported STM32CubeMx v6.8.0 deletes Folder added by user when regenerate the code using MDK-ARM issue. This issue is already solved in STM32CubeMX6.9.1 version.

151040 ticket reported STM32CubeMX deletes manually added folders "Utilities" or "Middlewares" (same folder name reserved by Cube MX). This issue will be solved in the coming release. 

To reproduce your issue, could you please describe the steps to follow?

Thank you.

Kaouthar   

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.
Associate II
August 25, 2023

Hi @KDJEM.1 ,

it seems to be the same problem as 151040.

To reproduce the issue:

  • Generate a Project in STM32Cube IDE including Azure RTOS packages
  • A folder named "Middelwares" will be created
  • Adding a new sub folder named "System" to "Middlewares"
  • Open the *.ioc file and do some editing
  • regenerate the project and the "System" folder will be deleted

I hope this explanation helps. Best regards

Jens

ANauz.1
Senior
September 20, 2023

Hello

I have a similar issue. Using latest version of CubeMX: 6.9.2 with last L4 Firmware Package: 1.18

I'm using the default B-L462E-CELL1 demoboard project with some modifications. Each time I generate with CubeMX, it remove completely the Utilities directory. It seems that directories in Middleware are not removed.

Expected beavior: CubeMX do not touch to directories!

 

KDJEM.1
Technical Moderator
September 20, 2023

Hello @ANauz.1 ,

Concerning the issue: "STM32CubeMX deletes manually added folders with same folder name reserved by STM32CubeMX". It is not yet fixed in STM32CubeMx6.9.2 (RN0094-Rev 67), I'll let you know when the problem is solved.

Sorry for any inconvenience.

Kaouthar

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.
Associate III
January 21, 2025

Hi @ANauz.1 

 

Is there any update regarding this issue?

 

I have got STM32CubeMX 6.13.0 and I added sub-repos and other folders under Middlewares folder, but whenever I regenerate the code, these folders are deleted completely.

I tried two methods of code generation;

 

1. Using STM32CubeIDE 1.17.0 and modifying the .ioc file

2. Usin STM32CubeMX 6.13.0 and directly changing the .ioc project file

 

Kind Regards,

Hani

KDJEM.1
Technical Moderator
January 22, 2025

Hello @hakeila,

 

Are you creating a new folder named Middlewares or Utilities inside a project folder generated by STM32CubeMX?

As mentioned in UM1718 Rev 46 that STM32CubeMX uses reserved folder names. User cannot create new folder named Middlewares or Utilities inside project folder generated by STM32CubeMX, because, after code regeneration, those folders are deleted or modified.

If the issue is not solved, I recommend you to create a new thread. 

Thank you.

Kaouthar

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.