Locate libi2c-dev include paths
Tue Mar 5 18:06:00 GMT 2013
On Tue, Mar 5, 2013 at 10:55 AM, Michael Powell <email@example.com> wrote:
> On Tue, Mar 5, 2013 at 11:13 AM, Michael Powell <firstname.lastname@example.org>
> > In particular for linux/i2c-dev.h, and in particular in particular,
> > for the i2c_smbus_write_i2c_block_data keyword.
This should be available in the i2c-dev.h file installed by i2c-tools.
> > I've installed libi2c-dev, which i2c_smbus_write_i2c_block_data
> > apparently depends upon; i2c-tools won't do the trick.
It should work. You have to make sure that you build and install
i2c-tools (or, at least, the i2c header, since it's pretty low-level
and just relies on linux headers and inline functions) into your
cross-compiling root/staging area (so that your ARM compiles "see" the
Without knowing how you're setting up your root/stage area, I can't
give you more specific instructions.
> > When I build for x86, it works. When I build using our ARM
> > crosstool-ng cross compiler, the process complains about;
> > i2c_smbus_write_i2c_block_data.
It sounds like the i2c-dev.h file isn't getting installed into a place
where the ARM builds can find it. (This is the version from i2c-tools
-- the kernel version doesn't have the inline functions, possibly for
the reasons that I listed elsewhere...)
So you end up with either:
1. Using the up-to-date kernel versions, but you need to write your
own (fairly trivial) functions to do the marshalling and ioctl calls:
2. Using the i2c-dev.h file from i2c-tools, which incorporates
(probably slightly-out-of-date) versions of the above two files, and
includes the inline functions:
#include <i2c-dev.h> /* note, no "linux/"! */
Does that do the trick?
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc