Root/atusb/fw/README

Source at commit 313fb7c190db6521786843b66982c5d69bb6b585 created 13 years 1 month ago.
By Werner Almesberger, atusb/fw/Makefile (CFLAGS): simplify -I../fw/include to -Iinclude
1Requires very recent toolchain, because ATmega32U2 is relatively new.
2
3Building:
4
5make
6make upload prog
7
8--------------------------
9
10Making the toolchain:
11
12# patches according to
13# http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=789527
14
15# some gcc prerequisites
16
17apt-get remove avr-libc gcc-avr binutils-avr
18apt-get install libmpfr-dev libmpc-dev
19
20# binutils
21
22wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.tar.bz2
23tar xfj binutils-2.21.tar.bz2
24cd binutils-2.21
25./configure --target=avr --disable-nls
26make
27make install
28
29# gcc
30
31wget http://ftpmirror.gnu.org/gcc/gcc-4.5.2/gcc-4.5.2.tar.bz2
32wget -O gcc_452_avr.patch http://gcc.gnu.org/bugzilla/attachment.cgi?id=23050
33tar xfj gcc-4.5.2.tar.bz2
34cd gcc-4.5.2
35patch -p1 -s <../gcc_452_avr.patch
36mkdir obj-avr
37cd obj-avr
38../configure --target=avr --enable-languages=c \
39    --disable-nls --disable-libssp --with-dwarf2
40make
41make install
42
43wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-1.7.0.tar.bz2
44wget -O avr_libc_170.patch \
45  https://savannah.nongnu.org/support/download.php?file_id=21669
46tar xfj avr-libc-1.7.0.tar.bz2
47cd avr-libc-1.7.0
48patch -p0 -s <../avr_libc_170.patch
49./bootstrap # the automake at the end takes a while
50./configure --build=`./config.guess` --host=avr
51make
52make install
53

Archive Download this file



interactive