Closed daniel-starke closed 5 months ago
Hello @daniel-starke,
First of all thank you for this contribution. You cannot use this driver without the USE_FULL_LL_DRIVER definition.
Best Regards, Houssine
I know. The point is that USE_FULL_LL_DRIVER
does not gate all places in a consistent manner.
ST Internal Reference: 171944
Fixed in abbf9ca1b36c9abdb9339e86f0b7b2f4e79edc35
Describe the set-up
-Wimplicit-function-declaration
(does not defineUSE_FULL_LL_DRIVER
).Describe the bug
stm32h7xx_ll_utils.c
usesLL_RCC_CalcPLLClockFreq()
in several places.stm32h7xx_ll_rcc.h
is included, which declares the function. However, the declaration of this function is gates by the definition ofUSE_FULL_LL_DRIVER
. Failing to defineUSE_FULL_LL_DRIVER
results in a compiler warning "implicit declaration of function 'LL_RCC_CalcPLLClockFreq'". This may result in linker issues.How To Reproduce Compile
stm32h7xx_ll_utils.c
with the compiler flag-Wimplicit-function-declaration
and without definingUSE_FULL_LL_DRIVER
.Additional context I propose to move the declaration of
LL_RCC_CalcPLLClockFreq()
outside of theUSE_FULL_LL_DRIVER
block instm32h7xx_ll_rcc.h
.The warning was given for this line: https://github.com/STMicroelectronics/STM32CubeH7/blob/b340b13929e36a3427b8d94e8b1006022f82273f/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_utils.c#L929