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 ...
Hi Vasile Guta_Ciucur,
Could you please specify the STM32L1 device that you are using.
I use the Nucleo L152RE board and these are my OpenSTM32 projects I use with GitHub - funlw65/my_nucleo_l152re: Just functional test applications, showing my progress in learning STM32 micro. All projects compile just fine with the 1.6.0 version of the HAL driver.
The RTC_CR_BKP is defined in the "stm32l152xe.h" file;Please make sure that this file is correctly inserted.
Thank you Khouloud G, 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.
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.
The OpenSTM32 IDE creates a library project in the Workspace, named
"nucleo-l152re_hal_lib" (a library that will be linked to any of the
project you create with the IDE and tune with the CubeMX).
There is a subfolder named "HAL_Driver" which contains other two subfolders
named "Inc" and "Src".
If I manually replace these two subfolders with the ones contained in the
"STM32Cube_FW_L1_V1.7.0" repository, I get that error. And it won't work
until I overwrite them with the folders from "STM32Cube_FW_L1_V1.6.0"
repository. Probably this is not the correct way to update to the new
version of the driver.
This library project can be compiled stand-alone, without involving any of
the projects already created or new ones. With the current version it trows
the error. With the previous version, it compiles just fine. Again, the way
I "upgraded" the driver, is probably not the way of upgrading it.
On Thu, May 25, 2017 at 2:04 PM, Khouloud G <firstname.lastname@example.org>
Ah. I see now. The stm32l152xe.h header file from version 1.7.0 is not
identical with the one from 1.6.0 version (although, I thought the
definitions in a device header file won't change as Microchip is doing with
their device headers almost at every new version of their Mplab X IDE).
That is what you had to tell me...
So, it is not enough to replace only the HAL drivers, you have to also
replace the CMSIS drivers...
It wasn't hard... Guys, you really have to be connected with the OpenSTM32
team... to know and supervise what they are doing as there are the majority
of the programmers and students, working with free toolchains.
Thank you for the clue anyway!
Probably this is not the correct way to update to the new version of the driver.
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.
Retrieving data ...