cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 4.7.0 code generation issue

paulpaul9153
Associate II
Posted on April 29, 2015 at 15:09

Generating code from STM32CubeMX 4.7.0 (for STM32F072RBTx controller) messes up USER CODE 3 section of main.c, when an if instruction with braces is present.

For instance, original code

/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
ApplicRun();
if (cnt++ > 10000) {
 cnt = 0;
}
}
/* USER CODE END 3 */

after automatic code generation becomes

/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
ApplicRun();
cnt = 0;
}
}
/* USER CODE END 3 */

Did I go wrong anywhere?
1 REPLY 1
paulpaul9153
Associate II
Posted on April 30, 2015 at 14:17

The issue has been fixed by 4.7.1.