Code generator removes my application code from the main.c file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-15 12:37 PM - last edited on ‎2025-04-04 9:13 AM by Andrew Neil
Hello i'm new at using stm32ide
every time i make a change in the pin editor the generated code remove my application from the main.c file
i try to find solutions online i couldn't find any how can i edit my MCAL layer without losing my code ?
Solved! Go to Solution.
- Labels:
-
STM32CubeIDE
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-15 12:51 PM
In the generated files, there are regions marked with USER CODE BEGIN and USER CODE END. You may only modify code within those sections.
Here are three of many such sections:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-15 12:42 PM
Keep your code within USER CODE blocks and don't make modifications outside of those.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-15 12:46 PM
thanks for your reply
it works with me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-15 12:51 PM
In the generated files, there are regions marked with USER CODE BEGIN and USER CODE END. You may only modify code within those sections.
Here are three of many such sections:
