Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. CMake
  3. Arduino-CMake-Toolchain

Arduino-CMake-Toolchain

MITCMake

A CMake toolchain for cross-compiling projects to Arduino-compatible boards (AVR, ESP32, etc.) using standard CMake workflows.

GitHubGitHub
150 stars42 forks0 contributors

What is Arduino-CMake-Toolchain?

Arduino CMake Toolchain is a CMake toolchain file that enables cross-compilation of CMake-based projects for Arduino-compatible boards like AVR and ESP32. It solves the problem of being limited to the Arduino IDE by allowing developers to use professional CMake workflows, favorite IDEs, and advanced build features while maintaining compatibility with Arduino's build system.

Target Audience

Embedded developers and professionals who work with Arduino boards but prefer or require CMake-based build systems, IDE integration, and more control over the compilation process.

Value Proposition

Developers choose this toolchain because it provides a portable, generic CMake interface that works with any Arduino-compatible board without modifying project CMake scripts, unlike other Arduino CMake solutions that are board-specific or require Arduino-specific functions.

Overview

CMake toolchain for all Arduino compatible boards

Use Cases

Best For

  • Cross-compiling CMake projects for multiple Arduino board architectures
  • Integrating Arduino development with professional IDEs and build systems
  • Building complex Arduino applications with library dependency management
  • Automating firmware builds and uploads in CI/CD pipelines
  • Developing portable code that targets both Arduino and other platforms
  • Using advanced CMake features like configuration checks and cross-compilation

Not Ideal For

  • Projects requiring integrated serial port monitoring without external tools
  • Developers who primarily use .ino sketch files and prefer Arduino IDE's simplicity
  • Teams wanting a fully standalone solution for board and library management without Arduino IDE
  • Scenarios where rapid prototyping with minimal setup overrides build system flexibility

Pros & Cons

Pros

Broad Board Support

Supports all Arduino-compatible platforms like AVR and ESP32 through a single toolchain file, enabling cross-compilation without board-specific modifications.

Standard CMake Integration

Works with generic CMake projects by simply passing -D CMAKE_TOOLCHAIN_FILE, making it portable and IDE-agnostic, as emphasized in the project philosophy.

IDE Build Compatibility

Uses the same build rules, flags, and configuration files (e.g., boards.txt) as Arduino IDE, ensuring consistency with official Arduino workflows.

Flexible Library Linking

Provides target_link_arduino_libraries for linking with native and third-party libraries, including automatic dependency resolution similar to Arduino IDE.

Versatile Upload Options

Supports multiple upload methods like serial port, network provisioning, and programmer-based uploads through target_enable_arduino_upload, as detailed in the usage section.

Cons

Known Linking Bugs

Has issues with some boards where uploaded applications fail due to variant source linking problems, requiring fixes in development branches like release-1.1-dev.

Library Detection Limitations

target_link_arduino_libraries may not detect libraries if include names don't match library names, necessitating manual workarounds as noted in known issues.

Incomplete Feature Set

Lacks serial port monitoring, .ino/.pde file support, and standalone board/library management, which are standard in Arduino IDE but marked as missing features.

Multi-Architecture Complexity

Requires separate build trees or complex configurations for projects targeting multiple Arduino boards, as CMake doesn't support multiple architectures in one build tree.

Frequently Asked Questions

Quick Stats

Stars150
Forks42
Contributors0
Open Issues17
Last commit3 years ago
CreatedSince 2020

Tags

#embedded-systems#esp32#build-tools#cross-compilation#cmake#toolchain#arduino#firmware#arduino-ide#avr#make

Built With

C
CMake

Included in

CMake5.4k
Auto-fetched 17 hours ago

Related Projects

dockcrossdockcross

Cross compiling toolchains in Docker images

Stars3,600
Forks425
Last commit12 days ago
android-cmakeandroid-cmake

CMake toolchain file and other scripts for the Android NDK

Stars1,228
Forks425
Last commit8 years ago
pollypolly

:wrench: Collection of CMake toolchain files and scripts for cross-platform build and CI testing (GCC, Visual Studio, iOS, Android, Clang analyzer, sanitizers etc.)

Stars869
Forks187
Last commit5 years ago
ios-cmakeios-cmake

A toolchain file and examples using cmake for iOS development (this is a fork of a similar project found on code.google.com)

Stars317
Forks105
Last commit5 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub