Main Content

A bare metal programming guide

This guide is written for developers who wish to start programming microcontrollers using GCC compiler and bare metal approach. We are going to use a Nucleo-F429ZI development board with STM32F429 microcontroller (buy on Mouser). But basic principles would be applicable to any other microcontroller.

In this guide, I’ll show how to program a microcontroller using just a compiler and a datasheet, nothing else. Later I’ll explain what are the vendor’s CMSIS headers, how and why they should be used. We’ll learn how to blink LEDs, how to redirect printf() to UART, how to set up the system clock, how to use interrupts, and even how to run a web server with device dashboard.

To proceed, the following tools are required:

- ARM GCC, - for compiling and linking
- GNU make, - for build automation
- ST link, - for flashing”

Link to article