Bare metal programming guide logo

Bare metal programming guide

Free

a detailed guide for beginners

FreeFree tier
Type
Open Source

About Bare metal programming guide

A comprehensive open-source guide for programming ARM microcontrollers using a GCC compiler and datasheets, without relying on any frameworks. It covers fundamentals and helps understand how embedded frameworks like Cube, Keil, and Arduino work. Includes complete source code for each chapter that gradually increases in complexity, and provides bare-metal template projects for various architectures and boards (STM32, SAME54, TI, RP2040, ESP32-C3). Setup instructions are provided for Mac, Linux, and Windows.

Key Features

Written for developers starting bare-metal programming using a GCC compiler and datasheet
No frameworks required; explains how frameworks like Cube, Keil, and Arduino work
Complete source code for every chapter, progressing in functionality
Template projects for multiple architectures: blinky, cli, lfs, webui
Supports various boards: STM32 Nucleo-F429ZI, F303K8, L432KC, H563ZI, SAME54 Xplained, TI EK-TM4C1294XL, RP2040 Pico-W5500, ESP32-C3
Step-by-step tool setup for Mac, Linux, and Windows

Pros & Cons

Pros
  • Free and open-source with permissive license
  • Practical, hands-on approach with real code examples
  • Covers multiple popular microcontroller boards and architectures
  • Includes template projects for common embedded tasks (blinky, CLI, file system, web UI)
  • Clear setup instructions for major operating systems
Cons
  • Limited to ARM Cortex-M and RISC-V architectures (not general microcontroller programming)
  • Requires external hardware (development board, debugger) and toolchain installation
  • Not a complete reference; focuses on fundamentals and specific use cases

Best For

Learning bare-metal programming for ARM microcontrollers from scratchUnderstanding the inner workings of embedded frameworks and IDEsBuilding embedded projects without vendor libraries or abstractionsEducational resource for embedded systems courses or self-study

FAQ

What is this guide about?
It is a bare-metal programming guide for ARM microcontrollers that teaches how to program using only a GCC compiler and a datasheet, without any framework.
What tools are required to follow this guide?
You need ARM GCC, GNU make, ST link (for flashing), and Git. Setup instructions are provided for Mac, Linux, and Windows.
Which microcontroller boards are supported?
The guide includes template projects for STM32 Nucleo-F429ZI, F303K8, L432KC, H563ZI, SAME54 Xplained, TI EK-TM4C1294XL, RP2040 Pico-W5500, and ESP32-C3.