AnsweredAssumed Answered

CubeMX v4.21 - RTC LL drivers compilation errors

Question asked by Bogdan Golab on Jun 16, 2017
Latest reply on Mar 20, 2018 by Jeanne Joly

Hi,

Conditions captured:

-STM32F030F4,

-Low Level drivers for RTC selected,

-GUI: Activate Clock Source + Activate Calendar

-I2C enabled because another error is reported (lack of one of HAL source files) - but this is not a part of this issue report.

 

Compilation errors under Keil v5:

*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'STM32F030-RTC'
assembling startup_stm32f030x6.s...
compiling main.c...
../Src/main.c(233): warning:  #223-D: function "LL_RTC_BAK_GetRegister" declared implicitly
    if(LL_RTC_BAK_GetRegister(RTC, LL_RTC_BKP_DR0) != 0x32F2){
../Src/main.c(233): error:  #20: identifier "LL_RTC_BKP_DR0" is undefined
    if(LL_RTC_BAK_GetRegister(
TC, LL_RTC_BKP_DR0) != 0x32F2){
../Src/main.c(245): warning:  #223-D: function "LL_RTC_BAK_SetRegister" declared implicitly
      LL_RTC_BAK_SetRegister(RTC,LL_RTC_BKP_DR0,0x32F2);
../Src/main.c: 2 warnings, 1 error
compiling stm32f0xx_it.c...
compiling stm32f0xx_hal_msp.c...
compiling stm32f0xx_hal_gpio.c...
compiling stm32f0xx_hal_flash.c...
compiling stm32f0xx_hal_cortex.c...
compiling stm32f0xx_hal_pwr_ex.c...
compiling stm32f0xx_hal_rcc.c...
compiling stm32f0xx_hal_i2c_ex.c...
compiling stm32f0xx_hal.c...
compiling stm32f0xx_hal_rcc_ex.c...
compiling stm32f0xx_hal_rtc.c...
compiling stm32f0xx_hal_dma.c...
compiling stm32f0xx_hal_i2c.c...
compiling stm32f0xx_hal_rtc_ex.c...
compiling stm32f0xx_hal_pwr.c...
compiling stm32f0xx_ll_exti.c...
compiling stm32f0xx_hal_flash_ex.c...
compiling stm32f0xx_ll_rtc.c...
compiling stm32f0xx_ll_gpio.c...
compiling stm32f0xx_ll_utils.c...
compiling stm32f0xx_hal_tim.c...
compiling stm32f0xx_hal_tim_ex.c...
compiling system_stm32f0xx.c...
"STM32F030-RTC\STM32F030-RTC.axf" - 1 Error(s), 2 Warning(s).
Target not created.
Build Time Elapsed:  00:00:07

===

Concluded that RTC_BACKUP_SUPPORT is NOT set so added it to project properties BUT this time:

*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'STM32F030-RTC'
compiling stm32f0xx_hal_cortex.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_flash.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_pwr_ex.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr_ex.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_msp.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Src/stm32f0xx_hal_msp.c: 0 warnings, 2 errors
compiling main.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Src/main.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_gpio.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.c: 0 warnings, 2 errors
compiling stm32f0xx_it.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Src/stm32f0xx_it.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_i2c_ex.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_i2c.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_rcc_ex.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_dma.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_rtc.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rtc.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_rcc.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c: 0 warnings, 2 errors
compiling stm32f0xx_hal.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_rtc_ex.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rtc_ex.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_pwr.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c: 0 warnings, 2 errors
compiling stm32f0xx_ll_rtc.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rtc.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_flash_ex.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.c: 0 warnings, 2 errors
compiling stm32f0xx_ll_exti.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c: 0 warnings, 2 errors
compiling stm32f0xx_ll_gpio.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c: 0 warnings, 2 errors
compiling stm32f0xx_ll_utils.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_tim.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c: 0 warnings, 2 errors
compiling stm32f0xx_hal_tim_ex.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c: 0 warnings, 2 errors
compiling system_stm32f0xx.c...
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2593): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rtc.h(2616): error:  #136: struct "<unnamed>"  has no field "BKP0R"
    tmp = (uint32_t)(&(RTCx->BKP0R));
../Src/system_stm32f0xx.c: 0 warnings, 2 errors
"STM32F030-RTC\STM32F030-RTC.axf" - 48 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:  00:00:05

 

====

HAL drivers works fine - only LL is somewhat broken.

 

Thanks,

Bogdan

Outcomes