cancel
Showing results for 
Search instead for 
Did you mean: 

Combining HAL and LL driver generates compile warning/error: "assert_param" redefined

WNybe
Associate

If you are compiling the Cube-drivers with the flags: USE_HAL_DRIVER and USE_FULL_LL_DRIVER, and you are including an LL.c-file in your file list (e.g. stm32h7xx_ll_rcc.c) you will get: 

stm32h7xx_ll_rcc.c:27:0: error: "assert_param" redefined [-Werror]

You get this error because the code:

#ifdef  USE_FULL_ASSERT
  .............
#else
  #define assert_param(expr) ((void)0U)
#endif

is included in both the configuration header file: stm32h7xx_hal_conf.h (which is the mandatory configuration file based on the template file supplied in the HAL library) and in every LL.c-file (such as stm32h7xx_ll_rcc.c, stm32h7xx_ll_usart.h, etc.).

Is there a suggested work-around to avoid the redefinition of "assert_param"?

1 REPLY 1
ANauz.1
Senior II

Hello ST

Nearly 5 years after, the bug is still present!!! Cannot compile F4 project with HAL and LL driver.

Your are not testing the firmware package you release... really bad way of work, but ok. We know that we have to make the testing that you do not do.

But could you at least correct the but that are reported by users!!!!!!

Just do your job please