Der Inhalt dieser Seiten steht unter Creative Commons Lizenzvertrag

USB Controller Worklog

libgmp3-dev
libmpfr-dev
#!/bin/sh

# Prepare environment
cd ~
mkdir avr
cd avr
PREFIX=`pwd`
export PREFIX
PATH=$PATH:$PREFIX/bin
export PATH

# Download and install binutils
wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.tar.bz2
tar xvfj binutils-2.21.tar.bz2
cd binutils-2.21
mkdir build
cd build
../configure --prefix=$PREFIX --target=avr --disable-nls
make
sudo make install
cd $PREFIX

# Download and install gcc infrastructure
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz
tar xvfz mpc-0.8.1.tar.gz
cd mpc-0.8.1
mkdir build
cd build
../configure --prefix=$PREFIX
make
sudo make install
cd $PREFIX

# Download and install gcc
wget ftp://ftp.gwdg.de/pub/misc/gcc/releases/gcc-4.6.0/gcc-4.6.0.tar.bz2
tar xvfj gcc-4.6.0.tar.bz2
cd gcc-4.6.0
mkdir build
cd build
../configure --prefix=$PREFIX \
             --target=avr \
             --enable-languages=c,c++ \
             --disable-nls \
             --disable-libssp \
             --with-dwarf2
make
sudo make install
cd $PREFIX

# Download and install avr-libc
wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-1.7.1.tar.bz2
tar xvfj avr-libc-1.7.1.tar.bz2
cd avr-libc-1.7.1
mkdir build
cd build
../configure --prefix=$PREFIX --build=`./config.guess` --host=avr
make
sudo make install
cd $PREFIX

# Download and install dfu-programmer
wget http://sourceforge.net/projects/dfu-programmer/files/dfu-programmer/0.5.4/dfu-programmer-0.5.4.tar.gz
tar xvfz dfu-programmer-0.5.4.tar.gz
cd dfu-programmer-0.5.4
mkdir build
cd build
../configure --prefix=$PREFIX
make
sudo make install
cd $PREFIX
apt-get install gcc-avr avr-libc binutils-avr
git clone  http://github.com/tmk/tmk_keyboard
cd ps2_usb
make
dfu-programmer atmega32u2 erase
dfu-programmer atmega32u2 flash keyboard.hex
dfu-programmer atmega32u2 start