cancel
Showing results for 
Search instead for 
Did you mean: 

Hello STM32 Forum, If I modify and then generate code in SMT32CubeIDE (Version: 1.4.0 Build: 7511_20200720_0928 (UTC)), any code I add to main.c is deleted. I saw on a forum post that 'keep user generated code' must be ticked but I cannot find it

GCrow.1
Associate
 
1 ACCEPTED SOLUTION

Accepted Solutions
sivaram
Associate III

open the .ioc file in IDE, then click the 'project manager' tab of the ioc file and then click the 'Code Generator' from the left, you will find the option.

View solution in original post

4 REPLIES 4
sivaram
Associate III

open the .ioc file in IDE, then click the 'project manager' tab of the ioc file and then click the 'Code Generator' from the left, you will find the option.

GCrow.1
Associate

Great, thank you, just figured it out! I am going to have to get used to having code deleted if its not in the correct place.

TDK
Guru

Code between USER CODE tags will not be deleted. Don't put code anywhere else:

  /* USER CODE BEGIN *** */
 
  // your code here
 
  /* USER CODE END *** */

If you feel a post has answered your question, please click "Accept as Solution".
Imen.D
ST Employee

Hi @GCrow.1​ ,

When your question is answered, please close this thread by choosing "Select as Best".

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen