Skip to main content
TKopp.67
Associate III
May 19, 2022
Solved

Is there a way to make a your own file tree in a Cube IDE project and remove the Src Inc folders ?

  • May 19, 2022
  • 3 replies
  • 2034 views

Hi everyone,

I want to organise a little bit more our stm32cube projects. I want to remove Src and Inc folders and create some subfolders. Is it doable without having to use your own Makefile to compile the project ?

Thanks in advance for your answer, and sorry if that question has already been answered.

Best Regards,

Thomas

This topic has been closed for replies.
Best answer by KnarfB

It can be done, but you loose the possibility to re-generate the source code pieces generated from the .ioc file. Even if you don't want to re-generate now, you might want to re-generate later to profit from incoming updates.

You are also risking to clutter up the project structure if you accidently re-generate the code.

If you still want to do it, you have to adjust the Paths and Symbols properties of your project to reflect that new folder structure.

[Edit:] It is safe to add new folders and files and leave the generated stuff as is.

hth

KnarfB

3 replies

KnarfB
KnarfBBest answer
Super User
May 19, 2022

It can be done, but you loose the possibility to re-generate the source code pieces generated from the .ioc file. Even if you don't want to re-generate now, you might want to re-generate later to profit from incoming updates.

You are also risking to clutter up the project structure if you accidently re-generate the code.

If you still want to do it, you have to adjust the Paths and Symbols properties of your project to reflect that new folder structure.

[Edit:] It is safe to add new folders and files and leave the generated stuff as is.

hth

KnarfB

TKopp.67
TKopp.67Author
Associate III
May 19, 2022

Hi KnarfB,

Thanks for the answer, it's as i thought so that it would not be that simple because of the code generation.

have a nice day,

Best Regards,

Thomas

mattias norlander
ST Employee
June 8, 2022

It is only for "STM32Cube" project that you have a fixed project structure.

For Empty and CDT projects you are free to manage the structure of folders and files as you wish.

But no MX auto-generated code in these two project types. ...Just to complete the answer.