EmbDev.net

Forum: ARM programming with GCC/GNU tools Cross-compiling a driver for LM73 sensor for ARM11-based board


von Fight4UrRights (Guest)


Rate this post
useful
not useful
Hi everyone!!

I am working with a board with a ARM11 processor (Freescale i.MX31). I 
have successfully cross-compiled the linux kernel 2.6.31 and it's 
already running on the board.

In the board I have a LM73 temperature sensor connected via I2C. I 
already have the driver for the sensor (i.e. the lm73.c) and all the 
header files needed to cross-compile it.

I just wanted to ask if someone could tell me how to cross-compile the 
driver so that I can transfer it to the board and then insert it as a 
module.

I'm not an experienced linux user. I tried:

root@ubuntu:~/../LM73# "Cross_compiler_path" -o LM73 LM73.c

I get loads of errors that have nothing to do with my code but instead 
with header files that call other header files that call...

Maybe I should write a Makefile, which I guess would consist only of a 
few simple lines..??

I would appreciate any kind of help.

Thank you in advance.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.