cancel
Showing results for 
Search instead for 
Did you mean: 

on the STM32CubeIDE, once I initailize the necessary devices on .ioc, does it required to generatate the code automatically. once I enable a device, it always generate the code. I have to restart the whole code again from scratch.

cjaya.1
Associate II

Once I generate it. It deletes all the code work I have done.How can I disable that happening.

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

First and foremost, use some method to save your work and recover when needed: git or other version control. Or just make a copy of everything.

Next, check the options in the "project manager" group. There is option to NOT delete all files before re-generation. Learn about the USER CODE guard blocks.

View solution in original post

3 REPLIES 3
Pavel A.
Evangelist III

First and foremost, use some method to save your work and recover when needed: git or other version control. Or just make a copy of everything.

Next, check the options in the "project manager" group. There is option to NOT delete all files before re-generation. Learn about the USER CODE guard blocks.

Thank you for the reply. Does this "Code generation" is required in order to the device to work for example USART2 interrupts initialization and work with the interrupts receive.

The code generation is not strictly required. For example, you can write it yourself 🙂