Rafael Rodr�guez Velilla wrote:
>
> I've attached the code that I fail to compile.
>
Your code compiles fine for me! : )
Building using native RH 7.1 x86 dev host tool chain:
gcc -O2 foo.c
Using ARM cross dev tool chain:
/opt/hardhat/devkit/arm/sa_le/bin/arm_sa_le-gcc -O2 foo.c
Both work for me! : ) In my case, both my RedHat 7.1 and HHL 2.0 for StrongARM
header files are "up to date" as far as I2C is concerned.
Here are the failures w/o "-O2":
gcc foo.c
/tmp/ccrL6q6V.o: In function `main':
/tmp/ccrL6q6V.o(.text+0xbc): undefined reference to `i2c_smbus_read_byte_data'
collect2: ld returned 1 exit status
As I mentioned previously, you need -O1 or -O2 to expand the i2c-dev inline
function definitions "inline". Otherwise, they are assumed to be externally
defined functions.
--
Regards,
George
_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.