- Notifications
You must be signed in to change notification settings - Fork1k
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 fromhttps://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 thissummary!
We advise usingninja to perform the actual build.make or your IDE's build system should work too, though.To quote their home page:
You candownload the Ninja binary orfind it in your system's package manager.
This project makes heavy use of Python scripts to emulate some of Arduino'sdark magic (understand: handy automation)...We demand version >= 3.9. Please browse the officialPython download page. Alternatively, most Linux distributions package it themselves (e.g., APT...).
These are available onPyPi, meaning you can install them withpip 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 avirtual environment (Look upvirtualenv,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 theirdownload 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 thequickstart script to get started easily.This tool usesarduino-cli to inherit from your default Arduino installation.Learn how to install ithere.
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, butArduino's own.It has a small additional feature that is absolutely necessary for the task at hand, so don't get fooled!