X-Git-Url: https://git.gag.com/?p=fw%2Fcortex-toolchain;a=blobdiff_plain;f=summon-arm-toolchain;h=fe322e115d211de8e67b2269166f954666e32fd9;hp=fa6d103dfdefe14a67a08be468f29c904d7eec46;hb=c3332a57fb4c4a0e4675ca1e8ad0ad4c83dd72e4;hpb=902b6a0f6629abf8ac1c0245cbb572e11ab530af diff --git a/summon-arm-toolchain b/summon-arm-toolchain index fa6d103..fe322e1 100755 --- a/summon-arm-toolchain +++ b/summon-arm-toolchain @@ -17,8 +17,17 @@ PREFIX=${HOME}/arm-none-eabi # Install location of your final toolchain PARALLEL= # Or: PARALLEL="-j 5" for 4 CPUs DARWIN_OPT_PATH=/opt/local # Path in which MacPorts or Fink is installed +# For FSF GCC: +GCCVERSION=4.5.1 +GCC=gcc-${GCCVERSION} +GCCURL=http://ftp.gnu.org/gnu/gcc/${GCC}/${GCC}.tar.gz + +# For the Linaro GCC: +# GCCVERSION=4.5-2010.08-1 +# GCC=gcc-linaro-${GCCVERSION} +# GCCURL=http://launchpad.net/gcc-linaro/4.5/${GCCVERSION}/+download/${GCC}.tar.gz + BINUTILS=binutils-2.20 -GCC=gcc-4.5.1 NEWLIB=newlib-1.18.0 GDB=gdb-7.2 LIBCMSIS=v1.10-2 @@ -39,10 +48,13 @@ GCCFLAGS= GDBFLAGS= BINUTILFLAGS= +# To default to the Cortex-M3: +# GCCFLAGS="--with-arch=armv7-m --with-mode=thumb" + # Fetch a versioned file from a URL function fetch { if [ ! -e ${STAMPS}/$1.fetch ]; then - echo "Downloading $1 sources..." + log "Downloading $1 sources..." wget -c --no-passive-ftp $2 touch ${STAMPS}/$1.fetch fi @@ -91,13 +103,13 @@ mkdir -p ${STAMPS} ${SOURCES} cd ${SOURCES} fetch ${BINUTILS} http://ftp.gnu.org/gnu/binutils/${BINUTILS}.tar.bz2 -fetch ${GCC} http://ftp.gnu.org/gnu/gcc/${GCC}/${GCC}.tar.gz +fetch ${GCC} ${GCCURL} fetch ${NEWLIB} ftp://sources.redhat.com/pub/newlib/${NEWLIB}.tar.gz fetch ${GDB} http://ftp.gnu.org/gnu/gdb/${GDB}.tar.bz2 if [ ${LIBSTM32_EN} != 0 ]; then if [ ! -e libcmsis-${LIBCMSIS}.tar.bz2 ]; then - echo "Cloning libcmsis sources..." + log "Cloning libcmsis sources..." git clone git://git.open-bldc.org/libcmsis.git cd libcmsis git archive --format=tar --prefix=libcmsis-${LIBCMSIS}/ ${LIBCMSIS} | \ @@ -107,7 +119,7 @@ if [ ! -e libcmsis-${LIBCMSIS}.tar.bz2 ]; then fi if [ ! -e libstm32-${LIBSTM32}.tar.bz2 ]; then - echo "Cloning libstm32 sources..." + log "Cloning libstm32 sources..." git clone git://git.open-bldc.org/libstm32.git cd libstm32 git archive --format=tar --prefix=libstm32-${LIBSTM32}/ ${LIBSTM32} | \ @@ -117,7 +129,7 @@ if [ ! -e libstm32-${LIBSTM32}.tar.bz2 ]; then fi if [ ! -e libstm32usb-${LIBSTM32USB}.tar.bz2 ]; then - echo "Cloning libstm32usb sources..." + log "Cloning libstm32usb sources..." git clone git://git.open-bldc.org/libstm32usb.git cd libstm32usb git archive --format=tar --prefix=libstm32usb-${LIBSTM32USB}/ ${LIBSTM32USB} | \ @@ -129,7 +141,7 @@ fi if [ ${LIBOPENSTM32_EN} != 0 ]; then if [ ! -e libopenstm32-${LIBOPENSTM32}.tar.bz2 ]; then - echo "Cloning libopenstm32 sources..." + log "Cloning libopenstm32 sources..." git clone git://libopenstm32.git.sourceforge.net/gitroot/libopenstm32/libopenstm32 cd libopenstm32 git archive --format=tar --prefix=libopenstm32-${LIBOPENSTM32}/ ${LIBOPENSTM32} | \