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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-23 2:44 AM
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 */
}
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-23 3:42 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-23 3:02 AM
Did you saved the changes? before autogenerating?
Maybe the /* Infinite loop */ label is messing with the code generator?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-23 3:42 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-23 5:09 AM
ha! good one.
Tag yourself as best answer then
