Skip to content

A bare metal programming guide

This guide is written for developers who wish to start programming microcontrollers using GCC compiler and a datasheet.

ssekim

Published January 30, 2023 · © Apache License 2.0 (Apache-2.0)

Original author: Sergey Lyubka · IrelandOriginal source (new tab)

A bare metal programming guide

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.

BoardMCU datasheetBoard datasheetStatusSkeleton project
STM32 Nucleo-F429ZImcu datasheetboard datasheetcompletelink
TI EK-TM4C1294XLmcu datasheetboard datasheetcompletelink
RP2040 Pico-W5500mcu datasheetboard datasheetcompletelink

 

Comments

Comments