Get Free Shipping on orders over $49
Building Firmware with CMake : A practical guide to automating embedded builds, tests, and release artifacts - Amar Mahmutbegovi?

Building Firmware with CMake

A practical guide to automating embedded builds, tests, and release artifacts

By: Amar Mahmutbegovi?

eBook | 20 January 2027

At a Glance

eBook


RRP $49.49

$47.99

or 4 interest-free payments of $12.00 with

 or 

Available: 20th January 2027

Preorder. Download available after release.

Go beyond ad-hoc Makefiles and vendor IDE workflows by moving to a reproducible CMake-based firmware build system with automated testing and reliable outputs, from the author of bestselling C++ in Embedded Systems Free with your book: DRM-free PDF version + access to Packt's next-gen Reader*

Key Features

  • Pin toolchains and external dependencies for reproducible firmware builds across machines and CI
  • Automate complex firmware workflows including code generation and multi-target builds
  • Add unit and integration testing to your firmware build workflow

Book Description

Modern firmware builds rarely stop at "compile and flash." You are juggling multiple boards, cross toolchains, code generation, third-party libraries, and tests, often held together with ad-hoc scripts and vendor IDE projects. In Building Firmware with CMake, you will learn how to make your firmware builds repeatable, ensuring the same inputs produce the same binaries on different machines. This book takes a practical, firmware-first approach. You will set up pinned toolchains, lock external dependencies, and structure projects for multi-target builds. You will automate the steps that make embedded projects complex, including code generation and configuration variants. You will also add unit tests on the host and integration tests using simulators, so regressions are caught early and build results are trustworthy. Written by an embedded C++ engineer and author who builds and ships firmware for real products, this book focuses on patterns you can apply immediately to your own MCU projects. By the end, you will be able to build and test firmware in a consistent, maintainable way across targets and environments. *Email sign-up and proof of purchase required

What you will learn

  • Set up a reproducible firmware build environment
  • Write and understand core CMake build logic
  • Cross-compile bare-metal firmware for STM32
  • Run firmware in Renode simulator
  • Package reusable components and manage dependencies
  • Integrate code generation into the build
  • Build an automated test workflow with CTest
  • Scale the project across multiple MCU targets

Who this book is for

This book is for embedded firmware engineers building C/C++ on microcontrollers who want to replace ad-hoc Makefiles and vendor IDE projects with modern, reproducible CMake workflows. If you juggle cross-compiling, multiple boards/targets, third-party dependencies, and tests, you'll learn how to structure and automate builds that are portable across machines and CI. Recommended: hands-on MCU firmware experience and comfort with the command line and toolchains.

on

More in Compilers & Interpreters

Trustworthy Compilers - Vladimir O. Safonov

eTEXT

Fast Track to MDX - Mark Whitehorn

eTEXT

Software Process Modeling - Silvia T. Acuna

eTEXT