Skip to main content
cjaya.1
Associate III
October 10, 2022
Solved

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.

  • October 10, 2022
  • 1 reply
  • 919 views

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

This topic has been closed for replies.
Best answer by Pavel A.

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.

1 reply

Pavel A.
Pavel A.Best answer
Super User
October 10, 2022

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.

cjaya.1
cjaya.1Author
Associate III
October 10, 2022

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.

Pavel A.
Super User
October 11, 2022

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