Skip to main content
Vasile Guta_Ciucur
Senior
May 24, 2017
Solved

stm32l1xx_hal_rtc.c:424:38: error: 'RTC_CR_BKP' undeclared

  • May 24, 2017
  • 2 replies
  • 1637 views
Posted on May 24, 2017 at 11:06

The last driver for L1, version 1.7.0 contains this error when trying to compile projects in OpenSTM32 IDE where I replaced the HAL driver by hand. So I had to revert to 1.6.0 version.

stm32l1xx_hal_rtc.c:424:38: error: 'RTC_CR_BKP' undeclared ...

#error #driver #stm32l1 #openstm32 #170
This topic has been closed for replies.
Best answer by Khouloud GARSI
Posted on May 31, 2017 at 16:08

Hi

Guta_Ciucur.Vasile

‌,

Probably this is not the correct way to update to the newversion of the driver.

-> Correct.

When a new release is available, any file could be impacted.

Thus, the safest way to upgrade your project will be to create a new project based on the new release and after that you can add your user files.

  • To be conscious about the made updates, you may always refer to the release notes provided when downloading the STM32Cube package.All impacted files are described there.

Khouloud.

2 replies

Khouloud GARSI
Technical Moderator
May 24, 2017
Posted on May 24, 2017 at 16:51

Hi

Guta_Ciucur.Vasile

‌,

Could you please specify the STM32L1 device that you are using.

Khouloud.

Vasile Guta_Ciucur
Senior
May 24, 2017
Posted on May 24, 2017 at 17:38

I use the Nucleo L152RE board and these are my OpenSTM32 projects I use with

https://github.com/funlw65/my_nucleo_l152re

  All projects compile just fine with the 1.6.0 version of the HAL driver.
Khouloud GARSI
Technical Moderator
May 24, 2017
Posted on May 24, 2017 at 18:37

Hi

Guta_Ciucur.Vasile

‌,

The RTC_CR_BKP is defined in the 'stm32l152xe.h' file;

Please make sure that this file is correctly inserted.

Khouloud

Vasile Guta_Ciucur
Senior
May 24, 2017
Posted on May 24, 2017 at 19:04

Thank you

garsi.khouloud

‌, the problem is, right now I don't need the RTC peripheral, I don't use it in any of the projects I started. With the 1.6.0 version the projects compile just fine, with the 1.7.0 version, the compiler complains at the beginning of the library compilation (the library is compiled first), it does not reaches the files of the project. I suspect you guys will be contacted by the OpenSTM32 team, to signal this problem. Right now, they still provide the 1.6.0 version of the STM32L1 driver. It may be their problem, it may be yours (ST)... will see.

Khouloud GARSI
Technical Moderator
May 25, 2017
Posted on May 25, 2017 at 13:03

Hi

Guta_Ciucur.Vasile

‌,

Creating projects with OpenSTM32 and generating the pin configuration with STM32CubeMX.

Is the compilation error encountered after generating the code using CubeMX tool or after adding your own modification to the project.

Could you please share your ioc file for further check.

Khouloud.