cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop STMCubeMX updating the cmake file

hans86
Associate III

Hi All,

I use VSCode+STM32 plug-in and it works great, however, one problem I have is that every time I run STMCube32mx it updates the cmake file (CMakeLists.txt). There is no /*USER CODE */ section in this file so I have to constantly fix the CMakeLists.txt file with my additions.

I checked STM32CubeMX project manager settings and there is no option to not generate a build file and there are no options to add your settings.

Any idea?

Thanks,
Hans.

1 ACCEPTED SOLUTION

Accepted Solutions
hans86
Associate III

Just in case somebody else hits this issue, the STM32 plug-in handles this issue by providing 2 CMakeLists.txt files as shown below. The first (top) one is modified when you execute STM32CubeMX and the second one is for user additions and is only generated once as stated in the header.

hans86_0-1723802401102.png

I am sure this is described in the manual but you know how it is.....

Regards,
Hans.

View solution in original post

1 REPLY 1
hans86
Associate III

Just in case somebody else hits this issue, the STM32 plug-in handles this issue by providing 2 CMakeLists.txt files as shown below. The first (top) one is modified when you execute STM32CubeMX and the second one is for user additions and is only generated once as stated in the header.

hans86_0-1723802401102.png

I am sure this is described in the manual but you know how it is.....

Regards,
Hans.