finds.dev← search

// the find

cpq/bare-metal-programming-guide

★ 4,710 · C · MIT · updated Apr 2026

A bare metal programming guide (ARM microcontrollers)

A step-by-step guide to writing firmware for ARM Cortex-M microcontrollers from scratch — no HAL, no IDE, just GCC, make, and a datasheet. Covers everything from the vector table and linker scripts up through UART, SysTick, filesystem, and an embedded web server. Aimed at developers who want to understand what frameworks like Cube or Arduino are actually doing underneath.

The progression is genuinely well-structured: each step builds on the last and ships working code you can flash immediately. The volatile/non-volatile assembly comparison for SysTick is one of the clearest explanations of why volatile matters in embedded C that you'll find anywhere. Multi-board support (STM32, SAME54, TI, RP2040, ESP32-C3) means it's not just a one-vendor tutorial you'll outgrow. The repo actively builds in CI, so the examples don't quietly bitrot.

STM32 gets by far the most coverage — the non-STM32 boards mostly have blinky templates and little else, so if you're on TI or RISC-V the guide drops you early. There's no coverage of DMA, which you'll need the moment you want non-blocking UART at any real throughput. The embedded web server step pulls in the Mongoose library (from the same author's company), which is fine but means that chapter isn't really bare-metal anymore — it's 'use this library.' RTOS integration is out of scope entirely, so you'll hit a ceiling fast once you need preemption.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →