• Stars
    star
    169
  • Rank 224,453 (Top 5 %)
  • Language
    C
  • Created over 1 year ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Code for the "Bare Metal Series" videos

Bare Metal Series

About the project

This series is all about building bare-metal firmware for a Cortex-M4 STM32 microcontroller, using open source tools and libraries such as GCC and libopencm3. The project will cover everything from blinking an LED, to building a bootloader for performing firmware updates over UART/USB, to building a signed firmware security mechanism that allow only authorised code to run on the device. Stretch goal content includes breaking the security we build, as well as exploring more peripherals, applications, and algorithms in depth.

Prerequisites

You need to have the following installed and properly setup. Ensure that they are available in your path.

When using vscode

You'll want to install some extensions to make development smoother

  • C/C++
  • Cortex-Debug

Repo setup

# Clone the repo
git clone [email protected]:lowbyteproductions/bare-metal-series.git
cd bare-metal-series

# Initialise the submodules (libopencm3)
git submodule init
git submodule update

# Build libopencm3
cd libopencm3
make
cd ..

# Build the main application firmware
cd app
make

Debuggers

J-Link

The YouTube series makes use of J-Link debugger hardware and JLinkGDBServer for integrating with VS Code's debug functionality.

You can use the "JLink: Debug Application" and "JLink: Attach to active" VSCode tasks to debug your built binaries.

ST-Link

ST-Link is alternative debugger that you can use if you don't have a JLink debugger.

If you're using the same STM32F401RE Nucleo board presented in the YouTube series, ST-Link debugging hardware is already provided on the board (see the Day 0 video's Hardware section).

It's recommended that you install the ST-Link drivers.

You'll also need to install the open source ST-Link debugging tools. The primary application you'll need from that tool-set is stutil. Verify that stutil is available in your path before attempting to use the VSCode ST-Link debugging tasks.

Once your drivers and debugging tools are installed, you can use the "ST-Link: Debug Application" and "ST-Link: Attach active" VSCode tasks to debug your firmware over ST-Link.

More Repositories

1

JavaScript-Is-Weird

Code for the JS Is Weird (EXTREME EDITION) video
JavaScript
318
star
2

16-Bit-Virtual-Machine

Code for the "16-Bit Virtual Machine" Series
JavaScript
200
star
3

Parser-Combinators-From-Scratch

Code that accompanies the series
JavaScript
90
star
4

Digital-Logic-Simulator

Code for the "Digital Circuit Simulator In JavaScript" Episode
JavaScript
58
star
5

Promises-From-Scratch

Code for the "Promises From Scratch In A Post-Apocalyptic Future" video
JavaScript
54
star
6

RISC-V-Emulator

TypeScript
50
star
7

Learning-Resources

This repository serves as a list of resources that I have personally found useful for learning about certain concepts
39
star
8

Making-WAVs

Code for the Making WAVs video
JavaScript
33
star
9

Regular-Expression-Engine

Code for the Regular Expression Engine Video
JavaScript
29
star
10

mage-ascii-game-engine

Code to accompany the ASCII Game Engine series
TypeScript
27
star
11

Floating-Point-Implemented-In-JS

Code from the "Why 0.1 + 0.2 === 0.30000000000000004: Implementing IEEE 754 in JS" Video
JavaScript
17
star
12

3d-oscilloscope-renderer

Code for the "Rendering 3D Graphics On An Oscilloscope" video
Makefile
13
star
13

Priority-Queue

A generic priority queue implementation
TypeScript
12
star
14

Hiding-Data-In-Sound

Code for the "Hiding Data In Sound" video
Python
10
star
15

QOI

C
9
star
16

flow-fields

JavaScript
9
star
17

fixed-point-math

C
9
star
18

Bit-Packer

Squeeze those wasteful bits out of your data
TypeScript
8
star
19

The-Bits-And-Bytes-Of-Binary

Code for the "The Bits And Bytes Of Binary" series
JavaScript
6
star
20

BPS-Patcher

A BPS patcher written in C
C
5
star
21

led-panel-driver-in-gateware-ts

TypeScript
5
star
22

memory-dumper

Code for the "Getting up in another processes memory" video
Python
5
star
23

IPS-Binary-Patcher

An IPS patcher written in C
C
3
star
24

tixy.land-clone

JavaScript
2
star
25

Turning-Pixels-Into-Waves

Code for the "Turning Pixels Into Waves" video
JavaScript
2
star
26

gateware-ts-introduction

Makefile
1
star
27

stm32-ws2812b

Code for the "Bare Metal Bit Banging: WS2812B Driver" video
Makefile
1
star