[Nut-upsuser] cross-compiling nut

Charles Lepple clepple at gmail.com
Mon Jul 18 11:15:32 UTC 2011


On Jul 17, 2011, at 8:23 AM, Tilman Glotzner wrote:

> Hello,
>
> I would like to run nut 2.6.1 on an embeeded machine ( arm9 )  
> running linux and uclibc. A working gcc tool chain came with the  
> board.
> How can I compile and build nut using the cross compiler tool chain ?

Is the toolchain self-hosted? That is, can you run gcc on the board  
itself? (IMHO that is usually the easiest way to cross-compile.)

> I know that this is not a very specific question. I have however  
> little experience with cross compiling, and I wonder where to start.  
> A logical point would be the configure script. It however does not  
> find the cross compiler, and I have now idea how to tell the  
> configure script where to look for the cross compiler....

It's probably easiest to help you if you copy-and-paste some error  
messages that you are getting, because there are probably hundreds of  
ways to do this. But here's how to cross-compile NUT for Win32:

    ./configure --host=i586-mingw32msvc

The "i586-mingw32msvc" string is the prefix for the cross-compiler.  
You might have a file like "arm9-eabi-none-gcc" (which should be  
somewhere in $PATH), so in that case I think you would use "-- 
host=arm9-eabi-none".

-- 
Charles Lepple



More information about the Nut-upsuser mailing list