pi3-zig-simplest-bare-metal icon indicating copy to clipboard operation
pi3-zig-simplest-bare-metal copied to clipboard

Close to the simplest possible Zig bare metal program targetting a Raspberry Pi 3.

Simplest Raspberry Pi 3 bare metal program in Zig

Not literally the simplest possible bare metal Pi 3 program in Zig, but a very simple one, and pretty well-documented.

This program will alternate the GPIO pin 16 between 0 and 1, which is good for blinking an LED. High-tech stuff here, uh?!

I have written a blog post, From Bare Docs to Bare Metal, explaining some of the fundamentals of how to program the Raspberry Pi GPIO.

How to run

Build with zig build, copy the resulting zig-out/bin/kernel7.img file to an SD card, along with all files under firmware.