cancel
Showing results for 
Search instead for 
Did you mean: 

Circular dependency in HAL driver for STM32H5.

Imre
Associate II

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
    ...

 

1 ACCEPTED SOLUTION

Accepted Solutions
Imre
Associate II

Solved it by including stm32h5xx_hal.h instead of stm32h5xx_hal_conf.h 

View solution in original post

1 REPLY 1
Imre
Associate II

Solved it by including stm32h5xx_hal.h instead of stm32h5xx_hal_conf.h