cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate automatically st-project.cmake file.

Kenji1
Senior

Hi team.

I’m using VSCode with STM32 VSCode extension.

And I want to know, how to generate st-project.cmake when add new .c and .h files automatically?

Is  there any way?

Kenji1_0-1691075455485.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Found a way to regenerate the st-project.cmake based on https://community.st.com/t5/other-tools-mcus/including-external-header-files-in-project/m-p/54039/highlight/true#M15

To regenerate he CMake files:

1) Open STM32 VS CODE EXTENSION in a side bar or F1 + "Import a local STM32Cube project"

2) Select .cproject file again

This will scan project folders and add ALL source files into the project.

Two issues with this:

1) ALL source files added to the project and you can't hide or exclude.

2) The path for include files is not added.

 

View solution in original post

3 REPLIES 3
ZDima
Associate II

I am searching for the same answer. Have you found solution?

Found a way to regenerate the st-project.cmake based on https://community.st.com/t5/other-tools-mcus/including-external-header-files-in-project/m-p/54039/highlight/true#M15

To regenerate he CMake files:

1) Open STM32 VS CODE EXTENSION in a side bar or F1 + "Import a local STM32Cube project"

2) Select .cproject file again

This will scan project folders and add ALL source files into the project.

Two issues with this:

1) ALL source files added to the project and you can't hide or exclude.

2) The path for include files is not added.

 

Hi ZDima-san

I was able to solve my problem in this way.
Thank you!