Home Files Support List Resources

Support

Usage

Download the binary distribution for your platform and decompress the file in an appropriate place. Add this location ('bin' subdirectory) to your PATH environment variable and you are ready to go.

When compiling, remember to specify the target chipset with the "-mcpu" switch with your custom building options. (Actually, you should also specify linker scripts to match your architecture in order to build useful images.)

Example

  1. arm-elf-gcc -mcpu=arm7tdmi -mthumb -O2 -g -c hello_world.c
  2. arm-elf-gcc -mcpu=arm7tdmi -mthumb -o hello_world hello_world.o -lc

Documentation

Local documents in PDF format.

Build process

GCC's t-arm-elf file was updated to enable support for the following options:

  • marm/mthumb (arm or thumb code generation)
  • mhard-float/msoft-float (hardware or software fpu instructions)
  • mno-thumb-interwork/mthumb-interwork (arm-thumb modes interworking)

    The disabled options were mapcs-32/mapcs-26 (for old ARM machines with 26-bit program counters), fno-leading-underscore/fleading-underscore (non-ELF library function format) and mcpu=arm7 (for arm7 targets without a hardware multiply unit). Big endian targets are also disabled for new releases since nobody seemed to use them.

    Newlib was compiled using the "-DREENTRANT_SYSCALLS_PROVIDED" option in the CFLAGS_FOR_TARGET Makefile variable. This means you should provide your own stubs for the C-library syscalls, and is actually a good thing. Please check out Bill Gatliff's article about Newlib.

    The following steps and configuration switches were used in the compilation process:

    1. cd [binutils-build]
    2. [binutils-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib --with-float=soft
    3. make all install
    4. export PATH="$PATH:[toolchain-prefix]/bin"
    5. cd [gcc-build]
    6. [gcc-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib --with-float=soft --enable-languages="c,c++" --with-newlib --with-headers=[newlib-source]/newlib/libc/include
    7. make all-gcc install-gcc
    8. cd [newlib-build]
    9. [newlib-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib --with-float=soft
    10. make all install
    11. cd [gcc-build]
    12. make all install
    13. cd [gdb-build]
    14. [gdb-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib --with-float=soft
    15. make all install

ARM is a registered trademark of ARM Ltd. | Apple and Mac OS are registered trademarks of Apple Computer, Inc. | Linux is a registered trademark of Linus Torvalds. | Cygwin is a registered trademark of Red Hat, Inc. | Provided sources are covered by the GNU GPL and/or LGPL licenses. | GNUARM toolchain and this page maintained by Pablo Bleyer Kocik [pablo at bleyer dot org]