Skip to content

Bump to AVR toolchain 3.6.2 and latest packs for AVR-DB compatibility #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ avr8-headers.zip
avr8-headers/
gmp-5.0.2.tar.bz2
mpc-0.9.tar.gz
mpfr-3.0.0.tar.bz2
mpfr-3.1.0.tar.bz2
avr
atpack
gcc-7.3.0.tar.xz
6 changes: 3 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

This is the AVR Toolchain used in the [Arduino IDE](http://arduino.cc/).

As soon as Atmel [ships a newer toolchain](http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/), we pull the source code, **patch it** with some user contributed patches and deliver it with the [Arduino IDE](http://arduino.cc/).
As soon as Atmel [ships a newer toolchain](https://www.microchip.com/mplab/avr-support/avr-and-sam-downloads-archive), we pull the source code, **patch it** with some user contributed patches and deliver it with the [Arduino IDE](http://arduino.cc/).
Therefore, the resulting binaries may differ significantly from Atmel's. And you should start blaming us if things are not working as expected :)

### Configuring

Edit the `build.conf` file, currently the only thing worth changing is `AVR_VERSION` on the first line to match whatever the [latest version is](http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/).
Edit the `build.conf` file, currently the only thing worth changing is `AVR_VERSION` on the first line to match whatever the [latest version is](https://www.microchip.com/mplab/avr-support/avr-and-sam-downloads-archive).

At time of writing, the latest toolchain available is based on Atmel 3.6.1 version, but we replaced gcc component with a newer one, porting Atmel patches. It contains:
At time of writing, the latest toolchain available is based on Atmel 3.6.2 version, but we replaced gcc component with a newer one, porting Atmel patches. It contains:
- binutils-2.26
- gcc-7.3.0 (patches here https://github.com/arduino/toolchain-avr/tree/staging/avr-gcc-patches)
- avr-libc-2.0.0
Expand Down
100 changes: 0 additions & 100 deletions avr-libc-patches/02-power.patch

This file was deleted.

14 changes: 0 additions & 14 deletions avr-libc-patches/03-eeprom.patch

This file was deleted.

2 changes: 1 addition & 1 deletion avr-libc.build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ CONFARGS=" \
--libdir=$PREFIX/lib \
--disable-doc"

CC="avr-gcc" CXX="avr-g++" CFLAGS="-w -Os $CFLAGS" CXXFLAGS="-w -Os $CXXFLAGS" LDFLAGS="-s $LDFLAGS" ../avr-libc/configure $CONFARGS
AR="avr-ar" AS="avr-as" CC="avr-gcc" CXX="avr-g++" RANLIB="avr-ranlib" CFLAGS="-w -Os $CFLAGS" CXXFLAGS="-w -Os $CXXFLAGS" LDFLAGS="-s $LDFLAGS" ../avr-libc/configure $CONFARGS

if [ -z "$MAKE_JOBS" ]; then
MAKE_JOBS="2"
Expand Down
17 changes: 0 additions & 17 deletions binutils-patches/00-binutils-data_region_length.patch

This file was deleted.

1 change: 0 additions & 1 deletion binutils.build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ fi
tar xf avr-binutils.tar.bz2

cd binutils
for p in ../binutils-patches/*.patch; do echo Applying $p; patch -p1 < $p; done
autoconf
cd ld
autoreconf
Expand Down
12 changes: 6 additions & 6 deletions build.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AVR_VERSION=3.6.1
BUILD_NUMBER=arduino7
AVR_VERSION=3.6.2
BUILD_NUMBER=arduino8

AVR_SOURCES="http://downloads.arduino.cc/tools/opensource/Atmel-AVR-GNU-Toolchain/${AVR_VERSION}"
ATMEL_PACKS_SOURCES="http://packs.download.atmel.com/"
Expand All @@ -19,15 +19,15 @@ MPC_SOURCES="http://repository.timesys.com/buildsources/m/mpc/"
GCC_VERSION=7.3.0
MPFR_VERSION=3.1.0

ATMEL_ATMEGA_PACK_VERSION=1.4.351
ATMEL_ATMEGA_PACK_VERSION=1.6.364
ATMEL_ATMEGA_PACK_FILENAME=Atmel.ATmega_DFP.${ATMEL_ATMEGA_PACK_VERSION}
ATMEL_ATMEGA_PACK_URL=${ATMEL_PACKS_SOURCES}${ATMEL_ATMEGA_PACK_FILENAME}.atpack

ATMEL_ATTINY_PACK_VERSION=1.4.310
ATMEL_ATTINY_PACK_VERSION=1.9.337
ATMEL_ATTINY_PACK_FILENAME=Atmel.ATtiny_DFP.${ATMEL_ATTINY_PACK_VERSION}
ATMEL_ATTINY_PACK_URL=${ATMEL_PACKS_SOURCES}${ATMEL_ATTINY_PACK_FILENAME}.atpack

ATMEL_DX_PACK_VERSION=1.0.27
ATMEL_DX_PACK_VERSION=1.8.95
ATMEL_DX_PACK_FILENAME=Atmel.AVR-Dx_DFP.${ATMEL_DX_PACK_VERSION}
ATMEL_DX_PACK_URL=${ATMEL_PACKS_SOURCES}${ATMEL_DX_PACK_FILENAME}.atpack

Expand All @@ -43,7 +43,7 @@ fi
GREP=grep

#fallback for grep without pearl regexp
SOURCES_README="$(wget -O - ${AVR_SOURCES}/SOURCES.README 2>/dev/null)"
[ -z "$SOURCES_README" ] && SOURCES_README="$(wget -O - ${AVR_SOURCES}/SOURCES.README 2>/dev/null)"
[ -z "$GCC_VERSION" ] && GCC_VERSION="$(echo "$SOURCES_README" | $GREP "GCC" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")"
[ -z "$AUTOMAKE_VERSION" ] && AUTOMAKE_VERSION="$(echo "$SOURCES_README" | $GREP "automake" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")"
[ -z "$AUTOCONF_VERSION" ] && AUTOCONF_VERSION="$(echo "$SOURCES_README" | $GREP "autoconf" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")"
Expand Down
3 changes: 1 addition & 2 deletions gdb.build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ CONFARGS=" \
--disable-nls \
--disable-werror \
--with-guile=guile-2.0 \
--disable-binutils \
--target=avr"

CFLAGS="-w -O2 -g0 $CFLAGS" CXXFLAGS="-w -O2 -g0 $CXXFLAGS" LDFLAGS="-s $LDFLAGS" ../gdb/configure $CONFARGS $EXTRA_CONFARGS
Expand All @@ -70,7 +69,7 @@ if [ -z "$MAKE_JOBS" ]; then
MAKE_JOBS="2"
fi

nice -n 10 make -j $MAKE_JOBS
nice -n 10 make -j $MAKE_JOBS all-gdb

# New versions of gdb share the same configure/make scripts with binutils. Running make install-gdb to
# install just the gdb binaries.
Expand Down