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
- arm-elf-gcc -mcpu=arm7tdmi -mthumb -O2 -g -c hello_world.c
- 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)
- mlittle-endian/mbig-endian (little or big endian architectures)
- mhard-float/msoft-float (hardware or software fpu instructions)
- mno-thumb-interwork/mthumb-interwork (arm-thumb modes interworking)
- mcpu=arm7 (arm7 targets without hardware multiply)
The disabled options were mapcs-32/mapcs-26 (for old ARM machines with
26-bit program counters) and fno-leading-underscore/fleading-underscore
(non-ELF library function format).
The following steps and configuration switches were used in the
compilation process:
- cd [binutils-build]
- [binutils-source]/configure --target=arm-elf
--prefix=[toolchain-prefix] --enable-interwork --enable-multilib
- make all install
- export PATH="$PATH:[toolchain-prefix]/bin"
- cd [gcc-build]
- [gcc-source]/configure --target=arm-elf --prefix=[toolchain-prefix]
--enable-interwork --enable-multilib --enable-languages="c,c++"
--with-newlib --with-headers=[newlib-source]/newlib/libc/include
- make all-gcc install-gcc
- cd [newlib-build]
- [newlib-source]/configure --target=arm-elf
--prefix=[toolchain-prefix] --enable-interwork --enable-multilib
- make all install
- cd [gcc-build]
- make all install
- cd [gdb-build]
- [gdb-source]/configure --target=arm-elf --prefix=[toolchain-prefix]
--enable-interwork --enable-multilib
- make all install
|