Skip to content


This is the required software for generating, compiling and programming projects with modm:

Note that the modm examples use the SCons build system by default, however, you are not required to use it. See the reference manual for additional build system documentation.

Use GCC 7 or newer

modm uses C++14, so you need at least GCC 5, preferably GCC 7.

Beware of AVRs

We strongly discourage using AVRs for new designs, due to a significant lack of commitment from Atmel on keeping their AVR toolchain up-to-date.

Check your Locale

If you get a UnicodeEncodeError when calling lbuild, you may need to add export LC_ALL=C.UTF-8 to your .bashrc. Consult the internet until python3 -c "import sys; print(sys.stdout.encoding)" returns UTF-8.

Please help us keep these instructions up-to-date!


We will use Homebrew to install the minimal build system:

brew install python3 scons git doxygen
pip3 install --user git+ \
                    jinja2 configparser pyelftools

Install the AVR toolchain from source:

brew tap osx-cross/avr
brew install avr-gcc

And the official ARM toolchain as well:

brew tap ARMmbed/formulae
brew install arm-none-eabi-gcc
brew install openocd --HEAD

To compile modm for macOS you need to install boost:

brew install boost


For Ubuntu 16.04LTS, these commands install the basic build system:

sudo apt-get install python3 python3-pip scons git
sudo apt-get --no-install-recommends install doxygen
pip3 install --user git+ \
                    jinja2 configparser pyelftools

Install the AVR toochain:

sudo apt-get install gcc-avr binutils-avr avr-libc avrdude

avr-gcc on Ubuntu

Ubuntu does not provide a more recent avr-gcc than v4.9, which does not fully support C++14. For our CI we've created a precompiled version of avr-gcc 7 for Ubuntu. Use at your own risk.

And the official ARM toolchain as well:

sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt-get update
sudo apt-get install gcc-arm-embedded openocd

To compile modm for Linux you need to install these packages:

sudo apt-get install gcc build-essential libboost-thread-dev \
                     libboost-system-dev libasio-dev


We will use Anaconda to create a new Python 3 environment and install all necessary packages.

conda create --name modm python=3
activate modm
conda install -c conda-forge jinja2 scons future pyelftools git git+

For ARM development install the Windows 32-bit build of the GNU Arm Embedded Toolchain. For programming and debugging ARM Cortex-M devices install the pre-build OpenOCD binaries. You'll need to add both /bin paths to your PATH variable manually.

For non-English speakers

For now project and build paths containing non-ASCII characters are not parsed correctly.

Dear Windows users

We don't regularly use Windows with modm, so we rely on YOU to keep these install instructions working and up-to-date. Please open a PR with improvements.