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.
Build with zig build
, copy the resulting zig-out/bin/kernel7.img
file to an
SD card, along with all files under firmware
.