Last active
August 29, 2015 14:20
-
-
Save aczid/84c59283d8ee95c2483f to your computer and use it in GitHub Desktop.
AVR build script for bleeding edge toolchain (extended)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# - requires git, svn, hg installed | |
# - will just build the bleeding edge of everything | |
export PREFIX=`pwd` | |
export PATH=$PATH:$PREFIX/bin/ | |
export SRCDIR=$PREFIX/src/ | |
# todo test if SRCDIR exists, then get the source | |
mkdir -p $SRCDIR | |
# get binutils/gdb, gmp, mpfr, mpc | |
cd $SRCDIR | |
git clone git://sourceware.org/git/binutils-gdb.git | |
hg clone https://gmplib.org/repo/gmp/ | |
git clone https://gforge.inria.fr/git/mpc/mpc.git | |
svn checkout svn://scm.gforge.inria.fr/svn/mpfr/trunk mpfr | |
svn checkout svn://gcc.gnu.org/svn/gcc/trunk gcc_trunk | |
# get avr-libc, avarice, simulavr, avrdude | |
svn checkout svn://svn.savannah.nongnu.org/avr-libc/trunk/avr-libc | |
svn checkout svn://svn.code.sf.net/p/avarice/code/trunk/avarice | |
git clone git://git.savannah.nongnu.org/simulavr.git | |
svn co svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude | |
# install gcc with all the binutils stuff + gmp/mpfr/mpc in-tree | |
cd $SRCDIR/gcc_trunk | |
#patch <apply any patches you have here> | |
for file in ../binutils-gdb/* ; do ln -s "${file}" ; done | |
ln -s $SRCDIR/gmp gmp | |
ln -s $SRCDIR/mpc mpc | |
ln -s $SRCDIR/mpfr mpfr | |
mkdir obj-avr | |
cd obj-avr | |
../configure --prefix=$PREFIX \ | |
--libdir=$PREFIX/lib/ \ | |
--host=x86_64-pc-linux-gnu \ | |
--build=x86_64-pc-linux-gnu \ | |
--target=avr \ | |
--enable-languages=c,c++ \ | |
--with-newlib \ | |
--disable-shared \ | |
--disable-threads \ | |
--disable-nls \ | |
--disable-libssp \ | |
--disable-libada \ | |
--with-dwarf2 \ | |
--enable-version-specific-runtime-libs \ | |
--enable-fixed-point \ | |
--with-pkgversion='by Aram Verstegen' \ | |
--with-bugurl='http://www.google.com/ :)' | |
make | |
make install | |
## install avr-libc | |
cd $SRCDIR/avr-libc | |
./bootstrap | |
mkdir obj-avr | |
cd obj-avr | |
../configure --prefix=$PREFIX --build=`../config.guess` --host=avr | |
make | |
make install | |
# install avarice | |
cd $SRCDIR/avarice | |
./Bootstrap | |
mkdir obj-avr | |
cd obj-avr | |
../configure --prefix=$PREFIX | |
make | |
make install | |
# install simulavr | |
# still sort of broken | |
#cd $SRCDIR/simulavr | |
#./bootstrap | |
#mkdir obj-avr | |
#cd obj-avr | |
#../configure --prefix=$PREFIX --disable-doxygen-doc --enable-dependency-tracking | |
#make | |
#make install | |
# install avrdude | |
cd $SRCDIR/avrdude | |
./bootstrap | |
mkdir obj-avr | |
cd obj-avr | |
../configure --prefix=$PREFIX | |
make | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment