cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube 1.5.0 compilation

mats23
Associate II
Posted on March 30, 2015 at 15:08

Hi,

I am trying to step up from STM32Cube 1.1.0 to 1.5.0, but get some compilation errors that I just fail to understand. I am using a 32F429I-Discovery board and ''arm-none-eabi-gcc 4.9.2-5'' as compiler. The error I get at compilation is:

...stm32cube_fw_f4/1.5.0/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h:560:41: error: expected expression before 'do'
#define __HAL_RCC_GPIOG_CLK_ENABLE() do { \
^

Looking at the file stm32f4xx_hal_rcc_ex.h at line 560 the code has been rewritten since older versions of the STM32Cube and now looks like:

#define __HAL_RCC_GPIOG_CLK_ENABLE() do { \
__IO uint32_t tmpreg; \
SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOGEN);\
/* Delay after an RCC peripheral clock enabling */ \
tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOGEN);\
UNUSED(tmpreg); \
} while(0)

But, I cannot understand why this gives me any problems. Browsing the internet the best hint I have found suggested using the compiler flag -openmp, but that gives me other errors of missing ''.d'' files. Is there anyone else who has seen similar problems? /M
1 REPLY 1
ee6328
Associate
Posted on November 21, 2015 at 13:26

Have you got to the bottom of this?

I am getting the same error.

Thanks