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

Author: Fight4UrRights (Guest)
Posted on:

Rate this post
0 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 

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.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.