---
title: "A bare metal programming guide"
url: "https://maker.wiznet.io/ssekim/projects/a-bare-metal-programming-guide/"
markdown_url: "https://maker.wiznet.io/ssekim/projects/a-bare-metal-programming-guide/md"
type: "UCC: User Created Content"
author: "Sergey Lyubka"
author_url: "https://github.com/cpq/bare-metal-programming-guide"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Sergey Lyubka"
original_url: "https://github.com/cpq/bare-metal-programming-guide"
license: "Apache License 2.0 (Apache-2.0)"
published: "2023-01-30"
language: "en"
likes: 13
views: 459
comments: 3
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# A bare metal programming guide

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

Original author: Sergey Lyubka (source: https://github.com/cpq/bare-metal-programming-guide)

## Article

## 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](https://www.st.com/resource/en/reference_manual/dm00031020-stm32f405-415-stm32f407-417-stm32f427-437-and-stm32f429-439-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf) | [board datasheet](https://www.st.com/resource/en/user_manual/dm00244518-stm32-nucleo144-boards-mb1137-stmicroelectronics.pdf) | complete | [link](https://github.com/cpq/bare-metal-programming-guide/blob/main/step-7-webserver/nucleo-f429zi) |
| TI EK-TM4C1294XL | [mcu datasheet](https://www.ti.com/lit/ds/symlink/tm4c1294ncpdt.pdf) | [board datasheet](https://www.ti.com/lit/ug/spmu365c/spmu365c.pdf) | complete | [link](https://github.com/cpq/bare-metal-programming-guide/blob/main/step-7-webserver/ek-tm4c1294xl) |
| RP2040 Pico-W5500 | [mcu datasheet](https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf) | [board datasheet](https://docs.wiznet.io/Product/iEthernet/W5500/w5500-evb-pico) | complete | [link](https://github.com/cpq/bare-metal-programming-guide/blob/main/step-7-webserver/pico-w5500) |

---

Source: https://maker.wiznet.io/ssekim/projects/a-bare-metal-programming-guide/
