A bare metal programming guide
This guide is written for developers who wish to start programming microcontrollers using GCC compiler and a datasheet.
13
Project description
A bare metal programming guide
This guide is written for developers who wish to start programming microcontrollers using GCC compiler and a datasheet - nothing else! The fundamentals explained in this guide, will help you understand better how frameworks like Cube, Keil, Arduino - and others, work.
The guide covers the following topics: memory and registers, interrupt vector table, startup code, linker script, build automation using make, GPIO peripheral and LED blinky, SysTick timer, UART peripheral and debug output, printf redirect to UART (IO retargeting), debugging with Segger Ozone, system clock setup, web server implementation with device dashboard, and automatic tests.
Every chapter in this guide comes with a complete source code which gradually progress in functionality and completeness. The last (web server) chapter is the most complete, and can be used as a skeleton for the project of your own, dear reader. Therefore, that last example project is provided for the other boards too. In this tutorial we'll use the Nucleo-F429ZI development board, so go ahead and download the "mcu datasheet" and the "board datasheet" for it.
| Board | MCU datasheet | Board datasheet | Status | Skeleton project |
|---|---|---|---|---|
| STM32 Nucleo-F429ZI | mcu datasheet | board datasheet | complete | link |
| TI EK-TM4C1294XL | mcu datasheet | board datasheet | complete | link |
| RP2040 Pico-W5500 | mcu datasheet | board datasheet | complete | link |