cancel
Showing results for 
Search instead for 
Did you mean: 

Cube MX custom template for custom folder structure

magene
Senior II

The STM32CubeMX User Manual (UM1718 section 3) and various threads on this forum lead me to believe I can customize the folder structure that CubeMX uses for where it puts the code files it generates. I'm not trying to do anything fancy, I'd just like to put all the .c and .h files that CubeMX generates in one BSP folder instead of the /Core/Inc and /Core/Src folders that it defaults to.

Seems like some file somewhere in the 

C:\ProgramFiles\STMicroelectronics\STM32Cube\STM32CubeMX\db\templates directory will have the magic code, but I haven't been able to find it.

Is generating a custom folder structure possible and if so how?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Souhaib MAZHOUD
ST Employee

Hello @magene 
First let me thank you for posting.

if i get you right, there is no option in CubeMx to customize your folder structure that contains all the file generated by CubeMX.

Otherwise, the section 6 in UM1718 talk about generating a custom code based on FTL file. By default, the custom file is generated in the user project root folder that you can change it with another.

Thank you,

Souhaib

 

View solution in original post

1 REPLY 1
Souhaib MAZHOUD
ST Employee

Hello @magene 
First let me thank you for posting.

if i get you right, there is no option in CubeMx to customize your folder structure that contains all the file generated by CubeMX.

Otherwise, the section 6 in UM1718 talk about generating a custom code based on FTL file. By default, the custom file is generated in the user project root folder that you can change it with another.

Thank you,

Souhaib