2020-05-14 03:04 AM
I created a new project from scratch based on a Nucleo L053R8 board using the STM32CubeIDE wizard. At compile time, I get a lot of errors in hal include files I even do not care about. Ic annot understand why. Example :
../Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rcc_ex.h:1959:1: error: unknown type name 'HAL_StatusTypeDef'; did you mean 'FLASH_TypeDef'?
Looking at HAL_StatusTypeDef, it is defined in file stm32l0xx_hal_def.h which is included in the file it finds an error : stm32l0xx_hal_rcc_ex.h !!!
all the other errors are of the same type with definition in stm32l0xx_hal_def.h included in the file where the error is found.
What is wrong ? Is it a bug ?
Solved! Go to Solution.
2020-05-14 06:13 AM
I just created a new project and it compiled fine. Make sure you're on the latest version of CubeIDE and the L0 repository.
In the source file you're compiling, ensure you're #including "stm32l0xx_hal.h".
Trace the include path for the error you're getting to see why stm32l0xx_hal_def isn't being included.
2020-05-14 06:13 AM
I just created a new project and it compiled fine. Make sure you're on the latest version of CubeIDE and the L0 repository.
In the source file you're compiling, ensure you're #including "stm32l0xx_hal.h".
Trace the include path for the error you're getting to see why stm32l0xx_hal_def isn't being included.
2020-05-14 06:23 AM
Thanks, it was the #include "stm32l0xx_hal.h" that did the trick, I was including stm32l0xx_hal_i2c.h in one of my source files...
Regards