Keil : function “assert_param” declared implicitly [Solution]

Rebuild target ‘Target 1’

compiling main.c…

compiling stm32f0xx_comp.c…

compiling stm32f0xx_crc.c…

STM32F0xx_StdPeriph_Driversrcstm32f0xx_crc.c(132): warning:  #223-D: function “assert_param” declared implicitly


STM32F0xx_StdPeriph_Driversrcstm32f0xx_dbgmcu.c(121): warning:  #223-D: function “assert_param” declared implicitly


STM32F0xx_StdPeriph_Driversrcstm32f0xx_gpio.c(120): warning:  #223-D: function “assert_param” declared implicitly


STM32F0xx_StdPeriph_Driversrcstm32f0xx_gpio.c(167): warning:  #223-D: function “assert_param” declared implicitly


STM32F0xx_StdPeriph_Driversrcstm32f0xx_tim.c(418): warning:  #223-D: function “assert_param” declared implicitly


STM32F0xx_StdPeriph_Driversrcstm32f0xx_adc.c: 28 warnings, 0 errors

assembling startup_stm32f030.s…

compiling system_stm32f0xx.c…

“.GM650.axf” – 70 Error(s), 394 Warning(s).

Target not created

Unfortunately i didn’t get much help in any forums and after two long days. It took me two days to figure it out. I had a working Keil v4 STM32 project and decided to cross reference it. I did verify all the details and everything was same except i found a define in the C/C++ compiler tab which said USE_STDPERIPH_DRIVER , When i included this define in my project, Voila! everything was right, 0 errors, 0 warnings. 

Solution to assert_param declared implicitly error in Keil :

1) Go to the menu and click on the tab Flash->Configure Flash Tools 

2) Click on the C/C++ tab

3) Find the Define field under Preprocessor Symbols and enter USE_STDPERIPH_DRIVER 

4) Click OK and recompile your project, your problem should be fixed now. 


Alternatively you can also fix the problem and define USE_STDPERIPH_DRIVER  by removing the comment on line no 125 of stm32f0xx.h file. 


Hope it helps someone 🙂

Also see: 


Leave a Comment