/images/avatar.png

Embedded Kate Blog

Arduino Internals: building sketches with Arduino CLI

In the previous post we took a closer look at how the Arduino IDE builds sketches. A lot happens behind the scenes — from the classic C/C++ build steps (preprocessing, compiling, assembling, and linking) to a few Arduino-specific additions.

Now, let’s take things a step further and build the same project without the Arduino IDE — this time using the Arduino CLI (Arduino Command Line Interface).

Compiling Arduino sketch via Arduino CLI

It’s worth to start with mentioning that, starting with Arduino IDE 2.0, the Arduino IDE uses the Arduino CLI for the build process. This means that when you build a sketch using the CLI directly, it follows exactly the same steps as the IDE does.