When i migrated my code from IAR to Keil v5 for STM32F0 ARM cortex M0 series, The whole STD_PERIPHERAL_LIBRARY of ST started giving this assert_param warning and error. I did try to include the necessary paths needed for library configuration. 

Rebuild target 'Target 1'

compiling main.c...

compiling stm32f0xx_comp.c...

compiling stm32f0xx_crc.c...

STM32F0xx_StdPeriph_Driver\src\stm32f0xx_crc.c(132): warning:  #223-D: function "assert_param" declared implicitly

    assert_param(IS_CRC_REVERSE_INPUT_DATA(CRC_ReverseInputData));

STM32F0xx_StdPeriph_Driver\src\stm32f0xx_dbgmcu.c(121): warning:  #223-D: function "assert_param" declared implicitly

    assert_param(IS_DBGMCU_PERIPH(DBGMCU_Periph));

STM32F0xx_StdPeriph_Driver\src\stm32f0xx_gpio.c(120): warning:  #223-D: function "assert_param" declared implicitly

    assert_param(IS_GPIO_ALL_PERIPH(GPIOx));

STM32F0xx_StdPeriph_Driver\src\stm32f0xx_gpio.c(167): warning:  #223-D: function "assert_param" declared implicitly

    assert_param(IS_GPIO_ALL_PERIPH(GPIOx));

STM32F0xx_StdPeriph_Driver\src\stm32f0xx_tim.c(418): warning:  #223-D: function "assert_param" declared implicitly

    assert_param(IS_TIM_ALL_PERIPH(TIMx)); 

STM32F0xx_StdPeriph_Driver\src\stm32f0xx_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: 

 




About the Author

is the author of this blog and is an Embedded systems design engineer by profession & Founder @ Valetron Systems Pvt Ltd


Email:This email address is being protected from spambots. You need JavaScript enabled to view it.

Find us on Google+

HIRE ME FOR YOUR PROJECT AS A FREELANCER

If you need to get your PCB manufactured and Assembled in India, Drop me a mail

 

EasyEDA: Free Circuit Design Software

  • Easy Schematic Capture
  • Powerful Circuit Simulation
  • Online PCB design

Design Your Circuit and PCB here:

https://easyeda.com/editor

Cheap PCB Manufacturing