if i will add any peripherals in existing code , existing code is disappear. new fresh code is generated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-28 3:24 AM
Hi,
I am using STM32CUBEIDE, project creation is simple. i modified that code and i add the more function. After i need to add another peripherals, so i use .ioc (stm32cubemx) add another peripherials , after save it ask create, when into my project modified code doesnot exist, new fresh code will appear. Can anyone tell me how to overcome this one.??
Solved! Go to Solution.
- Labels:
-
STM32CubeIDE
-
STM32CubeMX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-28 11:34 PM
@Community member has provided you right answer. You have to take care to USER CODE sections.
According your video you've get rid of some ... this is not supported. Each USER CODE section is having a BEGIN and a END ...
WHILE section is:
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
section 3 is:
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
Your code addon is only supported between related BEGIN / END statements.
According your video your code is included ok between a BEGIN and a END BUT they are not related ... WHILE is not 3 counterpart ...
Once your issue solved please mark such post as answered it will help community to access shortly to best material.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-28 7:34 AM
I guess this is one of the downsides of auto code generation.
There should be a check-box item about how it replaces files.
You should be putting your code within USER CODE BLOCK constraints.
With tools that behaviour this way, you should generate into a sandbox project, and merge into your live one, and always have a backup / repository.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-28 7:29 PM
hi,
thanks for answer. Can you explain step by step with details?. here, i attach video.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-28 11:34 PM
@Community member has provided you right answer. You have to take care to USER CODE sections.
According your video you've get rid of some ... this is not supported. Each USER CODE section is having a BEGIN and a END ...
WHILE section is:
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
section 3 is:
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
Your code addon is only supported between related BEGIN / END statements.
According your video your code is included ok between a BEGIN and a END BUT they are not related ... WHILE is not 3 counterpart ...
Once your issue solved please mark such post as answered it will help community to access shortly to best material.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-29 8:45 PM
Thanks sir... Its working... I didn't notice that once.. Thanks for saving my time
