[Buildroot] Compiling applications for ARM9

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Mon Dec 13 16:49:28 UTC 2010


Hello,

On Mon, 13 Dec 2010 12:39:18 +0100
Abhishek Ashtekar <Abhishek.Ashtekar at ubitronix.com> wrote:

> I have Buildroot running on the AT91SAM9G20 board and want to compile
> and run own application programs.
> 
> With Eclipse, GNU_ARM_Eclipse_Plugin (ARM Linux GCC ) when I try to
> compile a ' Hello World ', I get the error
> 
> /bin/sh: arm-elf-gcc: not found

arm-elf-gcc is a bare-metal toolchain, so you will not be able to
generate programs that will run under Linux with it.

You should use the toolchain that has been generated by Buildroot, i.e
output/staging/usr/bin/arm-linux-gcc.

> Then I compiled gnu-arm-installer from mcuprogramming.com that
> generated arm-elf-gcc in /gnu-arm-installer/install/bin.
> 
> After giving this path to C compiler and assembler, Still arm-elf-gcc
> is not found.

Again, arm-elf-gcc is a bare-metal toolchain, which has nothing to do
with a Linux toolchain. You can't pick any toolchain found by randomly
searching "arm toolchain" on Google. You need to understand a little
bit what you are doing.

> Or do I have to compile my applications using arm-uclibc-gcc ? From
> where or how do I get it ?

In output/staging/usr/bin/ in your Buildroot tree.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the buildroot mailing list