Skip to main content
Ala1980
Associate III
Aug 25, 2020 8:38 PM UTC
Solved

error in Library Header File

Hi,

I created a new project using ready HAL Libraries on STM32F3, I get an weird error (expected an identifier) on the following line in the file (stm32f303xc.h):

  __IO uint32_t TR;     /*!< RTC time register,                    Address offset: 0x00 */

Can anyone help?

This topic has been closed for replies.
KnarfB
KnarfBBest answer
Super User
Aug 25, 2020 8:51 PM UTC

As .h files are never compiled on their own, you should check the .c file including it and other include files too. Possibly TR is defined somwhere else as a constant or so.

2 replies

KnarfB
KnarfBBest answer
Super User
Aug 25, 2020 8:51 PM UTC

As .h files are never compiled on their own, you should check the .c file including it and other include files too. Possibly TR is defined somwhere else as a constant or so.

Ala1980
Ala1980Author
Associate III
Aug 25, 2020 9:09 PM UTC

Yes, you have right, RT was defined in other place too.

Thank you, solved