STM32CubeIDE generates a main.c with confusing comments?
It is not realy a bug as the code works fine even if any comment is placed at a wrong line but comments should make life easier.
Steps done to generate a main.c with STM32CubeIDE 1.7.0:
- New STM32 project
- selected a NUCLEO-F44rRE board and chose default initialization
- on Clock Config tab for Code Generator set "Gen. peripheral init as a pair of c/h files..."
Generated code of main.c at line 90ff:
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */What I think it should look like:
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
while (1)
{
/* USER CODE BEGIN WHILE */
/* USER CODE END WHILE */
}
/* USER CODE BEGIN 3 */
/* USER CODE END 3 */