# Written by Uwe Hermann <uwe@hermann-uwe.de>, released as public domain.
# Modified by Piotr Esden-Tempski <piotr@esden.net>, released as public domain.
# Written by Uwe Hermann <uwe@hermann-uwe.de>, released as public domain.
# Modified by Piotr Esden-Tempski <piotr@esden.net>, released as public domain.
# Settings section
# You probably want to customize those
##############################################################################
# Settings section
# You probably want to customize those
##############################################################################
-TARGET=arm-eabi # Or: TARGET=arm-elf
-PREFIX=${HOME}/arm # Install location of your final toolchain
+TARGET=arm-none-eabi # Or: TARGET=arm-elf
+[ -z $PREFIX ] && PREFIX=${HOME}/arm # Install location of your final toolchain
+[ -z $WORKDIR ] && WORKDIR=$PREFIX/work #temporary directory
PARALLEL= # Or: PARALLEL="-j 5" for 4 CPUs
# Set to 'sudo' if you need superuser privileges while installing
SUDO=''
# Set to 1 to be quieter while running
PARALLEL= # Or: PARALLEL="-j 5" for 4 CPUs
# Set to 'sudo' if you need superuser privileges while installing
SUDO=''
# Set to 1 to be quieter while running
# Set to 1 to build libstm32 provided by ST
LIBSTM32_EN=0
# Set to 1 to build libopenstm32 an open source library for stm32
# Set to 1 to build libstm32 provided by ST
LIBSTM32_EN=0
# Set to 1 to build libopenstm32 an open source library for stm32
# Make the gcc default to Cortex-M3
DEFAULT_TO_CORTEX_M3=1
##############################################################################
# Version and download url settings section
##############################################################################
# Make the gcc default to Cortex-M3
DEFAULT_TO_CORTEX_M3=1
##############################################################################
# Version and download url settings section
##############################################################################
- GCCVERSION=4.5.1
- GCC=gcc-${GCCVERSION}
- GCCURL=http://ftp.gnu.org/gnu/gcc/${GCC}/${GCC}.tar.gz
+ GCCVERSION=4.6.1
+ if [ ${USE_CPP} = 0 ]; then
+ GCC=gcc-core-${GCCVERSION}
+ GCCDIR=gcc-${GCCVERSION}
+ else
+ GCC=gcc-${GCCVERSION}
+ GCCDIR=${GCC}
+ fi
+ GCCURL=http://ftp.gnu.org/gnu/gcc/${GCCDIR}/${GCC}.tar.bz2
- GCCVERSION=${GCCRELEASE}
- GCC=gcc-linaro-${GCCVERSION}
- GCCURL=http://launchpad.net/gcc-linaro/4.6/${GCCRELEASE}/+download/${GCC}.tar.bz2
+ GCCVERSION=4.6-2011.07-0
+ GCC=gcc-linaro-${GCCRELEASE}
+ GCCDIR=gcc-linaro-${GCCVERSION}
+ GCCURL=http://launchpad.net/gcc-linaro/4.6/${GCCRELEASE}/+download/gcc-linaro-${GCCRELEASE}.tar.bz2
##############################################################################
# Fetch a versioned file from a URL
##############################################################################
# Fetch a versioned file from a URL
echo "******************************************************************"
echo "* $*"
echo "******************************************************************"
}
# Unpack an archive
echo "******************************************************************"
echo "* $*"
echo "******************************************************************"
}
# Unpack an archive
log Unpacking $*
# Use 'auto' mode decompression. Replace with a switch if tar doesn't support -a
ARCHIVE=$(ls ${SOURCES}/$1.tar.*)
log Unpacking $*
# Use 'auto' mode decompression. Replace with a switch if tar doesn't support -a
ARCHIVE=$(ls ${SOURCES}/$1.tar.*)