-
Notifications
You must be signed in to change notification settings - Fork 982
Setup
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:
- Kitware's APT repository (Debian, Debian-based)
- snap package (Ubuntu, mostly)
- Chocolatey package (Windows)
- pip package (universal)
- Your IDE may also have a plug-in to support CMake; please refer to its documentation when appropriate
Note
thanks to Alex Reinking for this summary!
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.
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...).
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
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.
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.
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
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
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!
-
Advanced usages