2018-06-27 08:03 AM
STM32Cube MX Project Build Problem
I'm having a build problem with a project brought over from STM32CubeMX with a -F072RB chip.
After opening the project in True Studio and building (clean) I find the following error (with description):Description Resource Path Location Typeexpected identifier or '(' before 'do' stm32f0xx_hal_rcc_ex.h /CAN-PRO M0/Drivers/STM32F0xx_HAL_Driver/Inc line 1203 C/C++ Problemexpected identifier or '(' before 'while' stm32f0xx_hal_rcc_ex.h /CAN-PRO M0/Drivers/STM32F0xx_HAL_Driver/Inc line 1209 C/C++ Problemin expansion of macro '__HAL_RCC_CAN1_CLK_ENABLE' main.c /CAN-PRO M0/Src line 75 C/C++ ProblemHere is the macro in question:#define __HAL_RCC_CAN1_CLK_ENABLE() do { \ __IO uint32_t tmpreg; \ SET_BIT(RCC->APB1ENR, RCC_APB1ENR_CANEN);\ /* Delay after an RCC peripheral clock enabling */ \ tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_CANEN);\ UNUSED(tmpreg); \ } while(0U)Any explanation would be helpful.Thanks, rwduggan