2015-04-29 06:09 AM
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?
2015-04-30 05:17 AM
The issue has been fixed by 4.7.1.