Good literature on ARM assembly is still hard to come by. Even on the internet, finding clear, in-depth answers often takes much longer than you'd hope.
So why ARM assembly? The ARM instruction set is everywhere: it powers almost all smartphones, tablets, and countless embedded systems. And when Apple eventually transitioned its Mac lineup to its own ARM-based chips, it became undeniable that this architecture represents the future.
Still, many people ask: Why learn assembly today when there are modern, presumably easier alternatives?
For most day-to-day tasks, high-level languages are certainly the right tool. But they do hit their limits. Anyone dipping their toes into “bare-metal” programming—developing directly on hardware without an operating system—will find plenty of C or C++ examples for the Raspberry Pi. Yet even there, assembly is indispensable: it is required just to boot the system before C or C++ can take over. On top of that, the typical advantages of high-level languages fade in bare-metal environments, as standard software libraries simply aren't available.
Furthermore, accessing hardware registers in C or C++ can often feel needlessly cryptic. The datasheets and reference manuals provided by hardware vendors are essentially written with assembly in mind. Once you get the hang of it, you realize that assembly isn't black magic. The real payoff is gaining a profound understanding of how the processor and the entire system actually operate—knowledge that abstract layers usually hide. It's no coincidence that assembly language remains a core topic in computer science curricula at many universities.
I know firsthand how tough the beginning can be. The most comprehensive reference for bare-metal development on the Raspberry Pi is the Circle project—written in C++. I took many ideas from it and painstakingly ported them to C, especially the USB support for keyboards, mice, and storage devices. Just to fully grasp how all the pieces fit together, I spent about four years intermittently diving into intensive two-week tinkering sessions.
What to expect from this book: This book is designed to serve both as a step-by-step foundation and as a practical reference. It focuses on bare-metal programming for the Raspberry Pi 4—specifically in 32-bit Assembly mode and 64-bit C mode. While the code examples are tailored to the Pi 4, I also address in the respective chapters how these concepts can be adapted to earlier models.
Starting in late 2023, the Raspberry Pi 5 entered the scene. It no longer supports 32-bit code on a hardware level and differs significantly from previous generations. Even setting up the display output posed immediate hurdles, as long-standing mechanisms were dropped by the developers. I cover how to navigate these changes in a dedicated chapter.
This book is launching initially as an online release. I am looking forward to your feedback and community support to refine the content together and build an outstanding reference guide.
Happy bare-metal coding!