2025-01-29 03:02 AM
Hi!
I have a project that will not compile due to "error: 'HAL_StatusTypeDef' does not name a type".
The project uses STM32H563 and includes file stm32h5xx_hal_conf.h.
The HAL_RCC_MODULE_ENABLED and HAL_GPIO_MODULE_ENABLED are defined.
When looking into it, I see circular dependency in the includes of header files from this stm32h5xx_hal_conf.h
stm32h5xx_hal_conf.h
stm32h5xx_hal_rcc.h
stm32h5xx_hal_def.h
stm32h5xx.h
math.h
stm32h563xx.h
core_cm33.h
system_stm32h5xx.h
stm32h5xx_hal.h --> (Here function declarations use HAL_StatusTypeDef) <--
stm32h5xx_hal_conf.h
Legacy/stm32_hal_legacy.h
stddef.h
math.h
--> (Here in stm32h5xx_hal_def.h is the definition of HAL_StatusTypeDef) <--
stm32h5xx_hal_rcc_ex.h
stm32h5xx_hal_def.h
stm32h5xx_hal_gpio.h
stm32h5xx_hal_def.h
...
Solved! Go to Solution.
2025-01-29 03:34 AM
Solved it by including stm32h5xx_hal.h instead of stm32h5xx_hal_conf.h
2025-01-29 03:34 AM
Solved it by including stm32h5xx_hal.h instead of stm32h5xx_hal_conf.h