Right solid instructions to build the toolchain and firmware…
The only issue is that our fork of the toolchain builder doesn’t work on newer versions of Linux. Instead we’re going to use this fork.
There are 2 major differences with the newer fork, it uses a slightly newer version of newlib (1.19.0 vs 1.16.0), plus it has some patches to remove C++ exceptions (which is irrelevant to us anyway).
I tried to backport the other changes which fix compilation on newer version of GCC, etc, but gave up. Later on today I’ll try compiling our toolchain on OSX and see if it still works.
Anyway instructions as follows…
# 1. install dependencies to compile the toolchain
sudo apt update
sudo apt upgrade
sudo apt install curl flex bison libgmp3-dev libmpfr-dev autoconf build-essential libncurses5-dev libmpc-dev texinfo
# both unzip and gperf needed to compile toolchain, but aren't listed as dependencies in the README
sudo apt install gperf unzip
# 2. compile the toolchain
# this will take a few hours, the tar steps can take a while and won't print anything to screen
cd
git clone https://github.com/monome/avr32-toolchain
cd avr32-toolchain
PREFIX=$HOME/avr32-tools make install-cross
# 3. install ragel and compile the firmware
sudo apt install ragel
export PATH="$HOME/avr32-tools/bin:$PATH"
cd
git clone --recursive https://github.com/samdoshi/teletype # change to repo of your preference
cd teletype
cd module
make
If you get a “low memory” warning from Windows, the toolchain compile will probably crash. In my VM with 8GB, I found that sometimes Microsoft Antimalware Service would consume over 4GB of RAM.
If it does crash then you need delete files and start again…
cd
rm -rf avr32-tools
rm -rf avr32-toolchain
# do step 2 again
If you’re trying to speed up firmware compilation, you can do something like make -j8, it will go a bunch faster. Because it’s not deterministic, there can be compilation failures if the Makefile doesn’t specify it’s dependencies perfectly (ours won’t), so for releases or final testing, best to do a make clean; make.