Preface
For ARM assembly, there isn't much available yet. Even on the internet, it’s not as easy to find as one might think. But why ARM assembly? The ARM instruction set is used in many devices: in most smartphones and tablet computers as well as in embedded systems. And just now, as I write this, a press release announced that the new Apple MAC will receive a processor that uses this instruction set. Why that is, I will reveal later.
Many people wonder why one should learn assembly when there are many alternatives that are supposedly easier. These alternatives are suitable for many things, but there are always situations where high-level languages reach their limits. Especially when dealing with "bare metal" programming on the Raspberry Pi, you will find many examples in C or C++. But even here, assembly is often used to start the system before even "C" or "C++" can be used. Particularly in "bare metal" programming, the advantages of high-level languages are limited because many functions depend on libraries that cannot be used here.
Sometimes, it seems very cryptic to me how registers of the Raspberry Pi are accessed in C or C++. Also, the manuals we have available are more geared towards assembly. Once you get the hang of it, however, assembly is not rocket science.
The benefit of assembly also lies in a deeper understanding of the workings and functionality of a system, which is often hidden by high-level languages. In many universities, assembly is still taught to provide an understanding of computer architecture and its operation.
I have tried to make this book usable both as a foundation and as a reference. Initially, there will only be an online version, where I hope other users will help improve the content. So, I hope for your support to make something great out of it.
This book describes both the programming of the Raspberry Pi 4 in 32-bit mode and "bare metal." Additionally, 64-bit information will also be included. The code shown here will only be functional on the Raspberry Pi 4. However, in the respective chapters, I will also address the previous versions of the Raspberry Pi and explain how the implementation could be done there.
Since December 2023, I also own a Raspberry Pi 5. It no longer supports 32-bit assembly. When implementing the Raspberry Pi 4 examples, I found that many things no longer work as they did in the previous models. The first obstacle was the graphics display, and inquiries to the developers revealed that some things are no longer supported. Nevertheless, I have tried to describe the same principle in a separate chapter.
In the previous version of this description, I had announced that I wanted to integrate USB support on the Raspberry Pi 4. This turned out to be very complex and was ultimately not implemented. However, I will continue to try on the Raspberry Pi 5.
| ^ Home | Next > |