[U-Boot-Users] i2c compiling and/or linking problem

Wolfgang Denk wd at denx.de
Thu Feb 10 18:05:24 CET 2005

In message <420B8EFE.7010301 at web.de> you wrote:
> Well, I wanted to compile u-boot with i2c support.

For which board? Which architecture?

> So I just added an #include <i2c.h> in to my boards board.c, put #define 

Why would you need this?

> CFG_HARD_I2C in the include-file and thought that'd be enough.

Why do you want to use CFG_HARD_I2C? Soft-I2C is much easier.

> Well... apparently that's not enough as compiling (make distclean done 
> before) stops in the linking process with a lot of complaints like this:
> undefined reference to `i2c_read'

Maybe there is no hardware I2C implementation for your processor?

> So... any suggestions where to add some references so it find all the 
> stuff? I tried to figure out what other boards that use i2c do, but 
> couldn't find any hints that I missed some Makefile or config, got lost 
> in the build-system.

You only have to compare the board config files. No other changes are
needed. Again, I recommend to use soft-i2c  instead.  There  is  zero
advantages with hard-i2c, just a lot of trouble.

Best regards,

Wolfgang Denk

Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A penny saved is a penny to squander.
- Ambrose Bierce

More information about the U-Boot mailing list