Hello STM32 Forum,
If I modify and then generate code in SMT32CubeIDE (Version: 1.4.0
Build: 7511_20200720_0928 (UTC)), any code I add to main.c is deleted. I saw on a forum post that 'keep user generated code' must be ticked but I cannot find it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-12 4:53 AM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-12 5:12 AM
open the .ioc file in IDE, then click the 'project manager' tab of the ioc file and then click the 'Code Generator' from the left, you will find the option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-12 5:12 AM
open the .ioc file in IDE, then click the 'project manager' tab of the ioc file and then click the 'Code Generator' from the left, you will find the option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-12 5:16 AM
Great, thank you, just figured it out! I am going to have to get used to having code deleted if its not in the correct place.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-12 6:21 AM
Code between USER CODE tags will not be deleted. Don't put code anywhere else:
/* USER CODE BEGIN *** */
// your code here
/* USER CODE END *** */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-13 6:11 AM
Hi @GCrow.1 ,
When your question is answered, please close this thread by choosing "Select as Best".
Imen
Thanks
Imen
