Question
STM32CubeMX 4.7.0 Bug Report - main.c, user code corrupted
Posted on March 24, 2015 at 00:12
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