Cross-compiling a driver for LM73 sensor for ARM11-based board

Guest #1498479
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.

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.