STM32CubeMX 4.7.0 Bug Report - main.c, user code corrupted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-03-23 4:12 PM
My conditions:
STM32CubeMX 4.7.0 STM32F042F6P6 and STM32F103CT6 STM32CubeMXremoves
bracket
inside/* USER CODE BEGIN 3 */
/* USER CODE END 3 */
section of main.c.
STM32CubeMX 4.7.0
Code before regeneration:
...
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
if (1)
{
}
}
/* USER CODE END 3 */
}
Code after regenerations using STM32CubeMX 4.7.0:
...
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
if (1)
/* <<< missing bracket */
}
}
/* USER CODE END 3 */
}
STM32CubeMX 4.6.0 was correct:
...
/* USER CODE BEGIN 3 */
/* Infinite loop */
while (1)
{
if (1)
{
}
}
/* USER CODE END 3 */
}
#stm32cubemx-main.c-user-code
- Labels:
-
STM32CubeMX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-03-25 8:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-04-07 7:05 AM
Issue is confirmed and will be fixed with next 4.8 version.
Sorry about that.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-04-07 10:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-04-07 2:04 PM
Hear hear!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-04-07 2:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-04-08 10:10 AM
If it's avoidable ST please make it so date doesn't update if file doesn't change.
Same request as the one in . And, yes your feedback will be taken into account :) -Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-04-09 5:36 AM
WRT the original issue, I have the following to work:
#define OPENBRACE {And then replace the opening braces that get deleted with OPENBRACE. It's ugly but it eliminates the need to fix this every time STM32CubeMX regenerates initialization code.Please add my vote not to gratuitously change the file contents when no other changes are made.Also add a Big Thanks for whoever provided the STM32CubeMX to run under Linux! Now if I could only get the rest of the tool chain to play along. ;)