From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Thu, 10 Feb 2005 18:05:24 +0100 Subject: [U-Boot-Users] i2c compiling and/or linking problem In-Reply-To: Your message of "Thu, 10 Feb 2005 17:42:38 +0100." <420B8EFE.7010301@web.de> Message-ID: <20050210170529.DDFD1C108D@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <420B8EFE.7010301@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 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