cancel
Showing results for 
Search instead for 
Did you mean: 

Error assert_param

mathijs
Associate
Posted on February 12, 2015 at 11:19

Hi

I have a problem generating a I2C-code for my STM32F2xx.

I used the STD_PERIPH_DRIVER and the files it contains. 

When i compile, i get an error like this: 

Error[Li005]: no definition for ''assert_param'' [referenced from C:\Users\user\Dropbox\School\Masterproef\Project\I2C-test\Debug\Obj\stm32f2xx_i2c.o] 

Is there anyone who can help me? Assert_param occurs in a lot of files. 

I guess i just miss the file that defines the function.

Greetings
1 REPLY 1
AvaTar
Lead
Posted on February 12, 2015 at 12:34

You need to add the define ''

USE_STDPERIPH_DRIVER

'' somewhere to your build settings. How you do it depends on your build environment. In case of a makefile, add ''

-DUSE_STDPERIPH_DRIVER

''.

The ''

assert_param()

'' macros is defined in the

stm32xxx_conf.h

file, which gets included from the

stm32fxxx.h

file - but only if

USE_STDPERIPH_DRIVER

is defined.

(Just assuming the F2xx stdperiph library is designed the same way as those for F0, F1, F3 and F4 ...).