I gave a talk at Raspberry JAM Tokyo 2026.10 about loading and debugging a research OS on a Raspberry Pi 5 over SWD, using the official Debug Probe. The slides are below.
The OS is Takibi, a research prototype in which I am building a language and a kernel together. This talk left the language out entirely. It is about what it took to load and debug a self-made OS on real hardware every day.
I chose the RPi5 because it is easy to buy and cheap – the Debug Probe costs a few thousand yen – while still having four Cortex-A76 cores and plenty of documentation. The 3-pin debug connector carries SWD or UART but not both, so the UART comes out on GPIO14/15.
The SD card holds a stub of about 100 lines, written once. It saves the DTB
the firmware hands over and waits in wfe. Every new kernel goes in by
halting the CPU with OpenOCD, loading the image straight into RAM over SWD,
and resuming.
OpenOCD 0.12.0 ships no bcm2712.cfg for the RPi5, so I vendored the one
published in an article on raspi.jp.
The Japanese community saved me a lot of work here. The config defaults to
1 MHz, but on my setup 30 MHz works fine.
reset halt stops with “how to reset?”. Instead I write a two-instruction
trampoline that calls PSCI SYSTEM_RESET and let the CPU run it – the same
path Linux’s reboot takes.Every script is in the repository. I hope it helps anyone writing their own OS on an RPi5.