Avr32-toolchain
From DorePublicWiki
This project provides means to build an AVR32 toolchain which includes the GCC C compiler and the Newlib C library.
The toolchain is suited for native AVR32 development (currently no AVR32 Linux support - ie. no Linux syscalls support).
The toolchain can be built either by Makefile or by using crosstool-NG. The latter is recommended.
Contents |
Crosstool-NG Build (Recommended)
The AVR32 support in crosstool-NG is still quite young. You can either grab the 1.5.2 release tarball ( which has preliminary support, see the crosstool-NG homepage ), or you can clone the crosstool-NG Mercurial repository.
Install Crosstool-NG
hg clone http://ymorin.is-a-geek.org/hg/crosstool-ng cd crosstool-ng ./configure --local make
Build Toolchain using Crosstool-NG
./ct-ng avr32-unknown-none ./ct-ng build
After successful build the toolchain is available in the $HOME/x-tools directory.
Add toolchain to environment
Simply add the toolchain by:
export PATH=$HOME/x-tools/avr32-unknown-none/bin:$PATH
Makefile Build (Obsolete)
Source
The source Makefile is available here:
http://dev.doredevelopment.dk/avr32-toolchain/Makefile
Building
To build simply type 'make' and the toolchain will download and build in your current directory.
After the build is finished the toolchain is available in the build/avr32/bin subdirectory.
The makefile supports the following targets:
- download (downloads all source)
- extract (extracts all sources including patches)
- patches (applies patches)
- binutils (builds binutils)
- gcc (builds gcc c compiler)
- newlib (builds newlib)
- avr32headers (installs AVR32 dev headers)
Note: The default target builds the above targets in mentioned order.
Binaries
The toolchain includes the following binaries:
avr32/bin/avr32-c++filt avr32/bin/avr32-ranlib avr32/bin/avr32-addr2line avr32/bin/avr32-gcc avr32/bin/avr32-cpp avr32/bin/avr32-ar avr32/bin/avr32-gccbug avr32/bin/avr32-strings avr32/bin/avr32-as avr32/bin/avr32-gprof avr32/bin/avr32-nm avr32/bin/avr32-size avr32/bin/avr32-objcopy avr32/bin/avr32-ld avr32/bin/avr32-strip avr32/bin/avr32-objdump avr32/bin/avr32-gcc-4.2.2 avr32/bin/avr32-readelf avr32/bin/avr32-gcov
Todo
- Fix GCC not building c++ support
- Fix GDB not building - it errors:
configure: error: *** unknown target vector bfd_elf32_avr32_vec
Eventhough GDB is patched with AVR32 patches from Atmel it still fails.
Note on toolchain patches
Most of the toolchain components (binutils, gcc, newlib, gdb) had to be patched with patches from Atmel. Unfortunately some of these patches are not directly available so tar.gz balls had to be made.
Also, the newlib AVR32 patch is broken for newlib 1.16.0 (mainly because Atmel used very old autotools to generate the configure scripts). This broken patch is fixed and also updated to newlib version 1.17.0.
Contact
For bugs and comments please send email to Martin Lund (mgl@doredevelopment.dk).
