Skip to content
Frederic Pillon edited this page May 28, 2024 · 6 revisions

Requirements

CMake

No surprise here: you need CMake to begin with. The actual requirement is version >= 3.21. The most straightforward way is to get it from https://cmake.org/download/.

Alternative installation methods:

Note

thanks to Alex Reinking for this summary!

Ninja

We advise using ninja to perform the actual build. make or your IDE's build system should work too, though. To quote their home page:

You can download the Ninja binary or find it in your system's package manager.

Python

This project makes heavy use of Python scripts to emulate some of Arduino's dark magic (understand: handy automation)... We demand version >= 3.9. Please browse the official Python download page. Alternatively, most Linux distributions package it themselves (e.g., APT...).

Python modules

These are available on PyPi, meaning you can install them with pip install <package>. When using third-party modules, in order not to impact any other project you may be working on, it is customary (but not mandatory!) to set up a virtual environment (Look up virtualenv, virtualenvwrapper on PyPi for more information on this process).

The following modules are used throughout the project:

  • jinja2, a templating engine to autogenerate some CMake configuration files.
  • graphviz, a rendering engine to generate graphs as insights into the project

Graphviz

This is the counterpart of the associated Python module. Its rendering engines turn .gv text files into .svg pictures. You can read about installation on their download page.

The two (this, and the Python module) are really optional requirement; if you only care about getting your code to compile, you may skip them.

arduino-cli

You may use the quickstart script to get started easily. This tool uses arduino-cli to inherit from your default Arduino installation. Learn how to install it here.

Compiler

As with Arduino IDE, there is nothing to do here! The compiler (arm-none-eabi-g++ et al.) will be downloaded when you first run CMake, in a separate folder in your user home directory. For the curious user, here is where we get it: https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack

CMSIS

As with the compiler, this will be downloaded silently (really, no, you get a message, but you see what I mean...). It comes from there: https://github.com/stm32duino/ArduinoModule-CMSIS

ctags

Nothing to do here either: this tool is also downloaded when first running CMake. It is used by Arduino to preprocess the sketches. The trick is that we are not talking about any of the "usual" ctags implementations that you may install through e.g., apt, but Arduino's own. It has a small additional feature that is absolutely necessary for the task at hand, so don't get fooled!

Clone this wiki locally