cancel
Showing results for 
Search instead for 
Did you mean: 

What are the differences begin user begin sections 1 to 4. (Generated by Cube MX, IDE). Which types of codes should be written there and why there is four different (or more) user code begin sections?

SalPaz
Associate II

This just looks like a comment but it seems a code outside these comment have different affect.

/* USER CODE BEGIN 1 */

/* USER CODE END 1 */

1 ACCEPTED SOLUTION

Accepted Solutions
SalPaz
Associate II

I have found the answer to myself.

The user code sections that are between two comment lines are dedicated to write the code inside the lines. Anycode written outside of these sections will be removed in case of anychange at CubeIDE interface (*.ioc)

View solution in original post

1 REPLY 1
SalPaz
Associate II

I have found the answer to myself.

The user code sections that are between two comment lines are dedicated to write the code inside the lines. Anycode written outside of these sections will be removed in case of anychange at CubeIDE interface (*.ioc)