2019-12-25 10:03:56 +00:00
|
|
|
# AVR Toolchain
|
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
|
|
|
|
```shell
|
2020-01-09 16:44:00 +00:00
|
|
|
apt install automake flex byacc bison build-essential libelf-dev libgmp-dev libmpfr-dev libmpc-dev libusb-1.0-0-dev libusb-dev libftdi-dev libftdi1
|
2019-12-25 10:03:56 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Binutils
|
|
|
|
|
|
|
|
```shell
|
|
|
|
$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.xz
|
|
|
|
$ tar xvf binutils-2.33.1.tar.xz
|
|
|
|
$ cd binutils-2.33.1
|
|
|
|
$ ./configure --target=avr --program-prefix="avr-"
|
|
|
|
$ make -j4
|
|
|
|
$ make install
|
|
|
|
```
|
|
|
|
|
|
|
|
## GCC
|
|
|
|
|
|
|
|
```shell
|
|
|
|
$ wget ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-9.2.0/gcc-9.2.0.tar.xz
|
|
|
|
$ tar cvf gcc-9.2.0.tar.xz
|
|
|
|
$ mkdir avrgcc-9.2.0
|
|
|
|
$ cd avrgcc-9.2.0
|
|
|
|
$ ../gcc-9.2.0/configure --target=avr --enable-languages=c,c++ --disable-libssp
|
|
|
|
$ make -j4
|
|
|
|
$ make install
|
|
|
|
```
|
|
|
|
|
|
|
|
## avr-libc
|
|
|
|
|
|
|
|
```shell
|
|
|
|
$ wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2
|
|
|
|
$ tar xvf avr-libc-2.0.0.tar.bz2
|
|
|
|
$ cd avr-libc-2.0.0
|
|
|
|
$ ./configure --host=avr
|
|
|
|
$ make -j4
|
|
|
|
$ make install
|
2020-01-09 16:07:20 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## avrdude
|
|
|
|
```shell
|
|
|
|
$ wget http://download.savannah.gnu.org/releases/avrdude/avrdude-6.3.tar.gz
|
|
|
|
$ tar xvf avrdude-6.3.tar.gz
|
|
|
|
$ cd avrdude-6.3
|
|
|
|
$ ./configure --enable-linuxgpio
|
|
|
|
$ make
|
|
|
|
$ make install
|
2019-12-25 10:03:56 +00:00
|
|
|
```
|