1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-12-24 03:38:59 +02:00
ben-wpan/atusb/fw3
2011-02-18 09:53:48 -03:00
..
an atusb/fw3/an/: USB debugging scripts 2011-02-13 23:00:35 -03:00
usb atusb/fw2/usb/: clean up comments left over from C8051F326 2011-02-14 12:54:29 -03:00
atusb.c atusb/fw3/: added copyright headers and title comments 2011-02-14 12:48:42 -03:00
board.c fw3/: remove probably useless RF debug output code from board.c 2011-02-14 12:49:44 -03:00
board.h fw3/: remove probably useless RF debug output code from board.c 2011-02-14 12:49:44 -03:00
descr.c atusb/fw3/: added copyright headers and title comments 2011-02-14 12:48:42 -03:00
ep0.c atusb/fw3/: added copyright headers and title comments 2011-02-14 12:48:42 -03:00
Makefile atusb/fw3: split USB driver into chip-specifc and general part 2011-02-14 12:01:11 -03:00
README atusb/fw3/README: build instructions for firmware and prerequisites 2011-02-18 09:53:48 -03:00
spi.c atusb/fw3/: added copyright headers and title comments 2011-02-14 12:48:42 -03:00
spi.h atusb/fw3/: added copyright headers and title comments 2011-02-14 12:48:42 -03:00
version.h atusb/fw3/: added copyright headers and title comments 2011-02-14 12:48:42 -03:00

Requires very recent toolchain, because ATmega32U2 is relatively new.

Building:

make
make upload prog

--------------------------

Making the toolchain:

# patches according to
# http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=789527

# some gcc prerequisites

apt-get remove avr-libc gcc-avr binutils-avr
apt-get install libmpfr-dev libmpc-dev

# binutils

wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.tar.bz2
tar xfj binutils-2.21.tar.bz2 
cd binutils-2.21
./configure --target=avr --disable-nls
make
make install

# gcc

wget http://ftpmirror.gnu.org/gcc/gcc-4.5.2/gcc-4.5.2.tar.bz2
wget -O gcc_452_avr.patch http://gcc.gnu.org/bugzilla/attachment.cgi?id=23050
tar xfj gcc-4.5.2.tar.bz2
cd gcc-4.5.2
patch -p1 -s <../gcc_452_avr.patch
mkdir obj-avr
cd obj-avr
../configure --target=avr --enable-languages=c \
    --disable-nls --disable-libssp --with-dwarf2
make
make install

wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-1.7.0.tar.bz2
wget -O avr_libc_170.patch \
  https://savannah.nongnu.org/support/download.php?file_id=21669
tar xfj avr-libc-1.7.0.tar.bz2 
cd avr-libc-1.7.0
patch -p0 -s <../avr_libc_170.patch
./bootstrap	# the automake at the end takes a while
./configure --build=`./config.guess` --host=avr
make
make install