cpq/bare-metal-programming-guide — explained in plain English
Analysis updated 2026-06-26
Set up an LED blink program with serial debug output on an STM32 or RP2040 board without any framework.
Build a command-line interface over a serial connection on a bare-metal microcontroller.
Implement a file system on a microcontroller's onboard flash memory from scratch.
Add a web server with a device dashboard to an embedded system without an operating system.
| cpq/bare-metal-programming-guide | attractivechaos/klib | cilium/tetragon | |
|---|---|---|---|
| Stars | 4,647 | 4,661 | 4,662 |
| Language | C | C | C |
| Setup difficulty | moderate | easy | hard |
| Complexity | 4/5 | 3/5 | 4/5 |
| Audience | developer | developer | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Requires an ARM GCC compiler, GNU Make, a supported hardware dev board, and a chip-specific flashing tool.
This repository is a written guide for developers who want to program microcontrollers from scratch, using only a GCC compiler and the chip's official datasheet, without relying on any framework like Arduino, Cube, or Keil. The author's goal is to explain the fundamentals of how embedded programming works at a low level, so readers understand what those higher-level frameworks are doing underneath. A microcontroller is a small self-contained computer, typically used to control physical hardware such as lights, motors, or sensors. Programming one from scratch means writing directly to the chip's memory registers, setting up interrupt handlers, and managing peripherals like general-purpose input/output pins yourself. This guide walks through all of that step by step. Each chapter comes with complete, buildable source code. The examples start very simply and grow in complexity across chapters. The final template projects cover four scenarios: a basic LED blink with debug output over a serial connection, a command-line interface over serial, a file system stored in the chip's onboard flash memory, and a working web server with a device dashboard interface. The guide covers several different development boards and chip families. These include boards from ST Microelectronics (with Cortex-M4 and Cortex-M33 chips), Microchip, Texas Instruments, the Raspberry Pi RP2040, and an Espressif ESP32-C3. Each board entry in the README links to its datasheet and a corresponding template project you can use as a starting point. Setup instructions are provided for macOS, Linux, and Windows. The required tools are an ARM GCC compiler, GNU Make, a flashing tool to transfer code to the board, and Git for downloading the repository. The project is licensed under MIT. The full README is longer than what was shown.
A step-by-step guide for programming microcontrollers from scratch using only GCC and the chip's datasheet, without any framework like Arduino or Keil. Learn how embedded programming works at the register level.
Mainly C. The stack also includes C, GCC, GNU Make.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.