AnsweredAssumed Answered

STM32Cube 1.5.0 compilation

Question asked by m_gustafsson on Mar 30, 2015
Latest reply on Nov 21, 2015 by mylonas.georgios
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

Outcomes