cancel
Showing results for 
Search instead for 
Did you mean: 

Why does configuration tool code generator changes my code in main between /* USER CODE BEGIN 5 */ and /* USER CODE END 5 */? I thought user code sections where untouched? What can be wrong?

sde c.1
Senior II

Everytime i run code generator, the main file is changed between User Code ?

  */
/* USER CODE END Header_StartDefaultTask */
void StartDefaultTask(void const * argument)
{
  /* USER CODE BEGIN 5 */
  /* Infinite loop */
  for(;;)
  {
	LedTask();
    osDelay(1);
  }
  /* USER CODE END 5 */
}

1 ACCEPTED SOLUTION

Accepted Solutions
sde c.1
Senior II

yes i always save the main file before generating code.

Found the issue, when creating another task i accidently copied the "/* USER CODE BEGIN 5 */" label from the main task.

There can be only 1 unique label !

Thank you

View solution in original post

3 REPLIES 3
Javier1
Principal

Did you saved the changes? before autogenerating?

Maybe the /* Infinite loop */ label is messing with the code generator?

we dont need to firmware by ourselves, lets talk
sde c.1
Senior II

yes i always save the main file before generating code.

Found the issue, when creating another task i accidently copied the "/* USER CODE BEGIN 5 */" label from the main task.

There can be only 1 unique label !

Thank you

ha! good one.

Tag yourself as best answer then

we dont need to firmware by ourselves, lets talk