Skip to content
Alexis Masson edited this page Sep 1, 2022 · 5 revisions

Welcome to the CMake port of Arduino_Core_STM32!


Warning: This wiki has been moved and is now obsolete

A more current version can be found at https://github.com/stm32duino/wiki/wiki/CMake_presentation


The goal of this repository is to let users build Arduino sketches for STM32 boards, without using neither Arduino IDE nor arduino-cli. Advantages of this approach include:

  • faster build time (about -50%, tested on Windows 10 and Ubuntu20.04);
  • flexibility: CMake has a full language centered around build description;
  • integration with IDEs: CMake integrates with most recent IDEs, easing the work of those who code outside of Arduino IDE;
  • better support of incremental compilation;
  • overstepping limits set by Arduino: sketch filename, library selection...

Of course, this all has a cost: building is no longer as simple as hitting "build" in Arduino IDE; there is a CMake file to write and maintain. However, much has been done to make the file as high-level as possible: it is written in CMake's own syntax, but makes heavy use of the custom functions defined here in the cmake/ folder. Didactic examples can be found on a separate repository: https://github.com/stm32duino/CMake_workspace.

Before delving into this wiki, be sure to read the dedicated README first!

Clone this wiki locally