Starting with Bare metal programming in raspberry pi 5, is quite a quirk. Raspberry pi 5 is horsepower for most embedded work but goes nuts with bare metal.

Why bare metal on RPi5, its just cause i got my hands on it and im interested to do it.

Warming up

Before starting bare metal programming, we would try to understand booting process.

Take a look up here,

In the above video we have discussed a bit regarding booting process but in depth, about different files.

Next up is actual gpio pins which are input output pins which we can see in diagram,

As to do hello world! bare metal, lets try to emulate same in python in rasp pi lite os,


from gpiozero import LED
from time import sleep

pin = LED(17)

while True:
    pin.on()
    sleep(0.5)
    pin.off()
    sleep(0.5)

As we saw our led blink we would now try to perform similar but in bare metal mode: