2015-03-23 04: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
2015-03-25 08:37 AM
2015-04-07 07:05 AM
Issue is confirmed and will be fixed with next 4.8 version.
Sorry about that.2015-04-07 10:10 AM
2015-04-07 02:04 PM
Hear hear!
2015-04-07 02:22 PM
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.
2015-04-09 05: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. ;)