Project Name: nnARM

News | People | Press & Release | Introduction | Documentation | Download | Testbench | GNU Tools | Business | Mail list | Contact me

GNU Tools

1 Why provide GNU Tools

There are many people who do not have a copy of ADS or SDT from ARM Inc. But they may want to join the development of nnARM. So I provide GNU Tools for ARM here.

2 GNU Tools Chain


I found these tools (except newlib-1.9.0) on the RedHat 7.1 source code CD, you can also download them from
And newlib-1.9.0 can be downloaded from

3 Configure and Build

It is very simple to configure and build, and I will describe the process below:

First, you must download all the tools packages, and place them in the same directory, assume /root/newgnu

Then unpack them with tar to the current directory, you will get four sub directories each containing source code of a package:

Because I want to build tools for various kinds of targets such as arm-elf and arm-aout, I use a new directory other than the source code directory to configure and build. Use the following commands to create new directories:

mkdir /root/newgnu/build-bin
mkdir /root/newgnu/gcc
mkdir /root/newgnu/newlib
mkdir /root/newgnu/gdb

First, you must configure and Build binutils package
I have a script that does it automaticlly

../binutils- --target=arm-elf --prefix=/usr/local -v

you must run this script in /root/newgnu/build-bin, if there is no error, then just type the following command to build:

make all

if there still is no error, type in the following command to install

make install

Next, to configure and build gcc

change to the source code directory of gcc, and add a symbolic link to the content of newlib so that configure can find newlib

ln -s /root/newgnu/newlib-1.9.0/newlib newlib
ln -s /root/newgnu/newlib-1.9.0/libgloss libgloss

then you can start to configure gcc using the following command in /root/newgnu/build-gcc

../gcc-2.96-20000731/configure --host=i686-pc-linux --target=arm-elf --prefix=/usr/local -v--with-newlib

then use the following command to build and install gcc:

make all install

if no error, then continue to build newlib, goto /root/newgnu/build-newlib and run the following command:

../newlib-1.9.0/configure --host=i686-pc-linux --target=arm-elf --prefix=/usr/local -v

if no error then run the following command to build and install:

make all install

then run the following command to configure and build and install gdb:

../gdb-5.0/configure --host=i686-pc-linux --target=arm-elf --prefix=/usr/local -v
make all
make install

when I run make all, the compiler tells me that it "does not know the storage size of struct tm in file /root/newgnu/gdb-5.0/gdb/rdi-share/devsw.c in line 39 and 69"
to solve this problem, just comment out these two lines, because they just declare two variables that are never used
run the above commands again and all is OK

4 How to use GNU Tools

For gcc, just use "arm-elf-gcc" to replace "gcc" to compile your program

For gdb, just use following command:

arm-elf-gdb program -x gdb-cmds

gdb-cmds is a command file for arm-elf-gdb, its content is listed below:

target sim

then you can debug programs with your favorite commands
Of course, please make sure that /usr/local/bin is in your path

5 insight:GUI for gdb

insight is a GUI for gdb, when you download insight, you also get gdb in the same package. I downloaded insight-5.0 from

The process of configuration and build of insight is very similar to gdb-5.0. In fact, Insight is GDB with a GUI, so the only difference is the path of the source code. If you place source code in the same directory as gdb, then you can use exactly the same method to build and install it

when you want to debug, just type in "arm-elf-gdb" to active the gdb with GUI