Raspberry Pi Bare Metal Assembly Programming
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Compress Huffman Demos Dec 21, 2016
Input R-Pi3 aarch64 kernel8 May 23, 2016
LIB Raspberry Pi 2 Feb 8, 2015
NEON/Fractal R-Pi3 aarch64 kernel8 May 23, 2016
SMP R-Pi3 aarch64 kernel8 May 20, 2016
Sound/PWM R-Pi3 aarch64 kernel8 May 23, 2016
TagsChannel R-Pi3 aarch64 kernel8 May 20, 2016
V3D Fix R-Pi 2 & 3 uncached control list Mar 14, 2017
VFP/Fractal R-Pi3 aarch64 kernel8 May 23, 2016
Video/GRBLZVideo R-Pi3 aarch64 kernel8 May 20, 2016
boot Convert To Use kernel_old, ORG = 0, Rpi2 SMP CPU ID Setup Dec 18, 2015
README.md R-Pi3 aarch64 kernel8 May 15, 2016



Raspberry Pi, Raspberry Pi 2 & Raspberry Pi 3 Bare Metal Code by krom (Peter Lemon).

All code compiles out of box with the FASMARM assembler by revolution:
I have included binaries of all the demos.

Special thanks to Dex (Craig Bamford), who helped me get my 1st pixel on the screen =D
Please check out DexOS, a lightning fast bare metal OS, & his Raspberry Pi port of DexBasic:

Also special thanks to phire, who helped me get my 1st triangle on the screen using the GPU =D

Also special thanks to rst, who helped me get my 1st SMP demo running using all 4 CPU cores of the Raspberry Pi 2 =D
Please check out Circle by rst, a C++ bare metal environment (with USB) for Raspberry Pi 1 & 2:

For more information about coding the ARM CPU please visit my webpage that I run with SimonB:

Howto Compile:
All the code compiles into a single binary (kernel.img for Raspberry Pi, kernel7.img for Raspberry Pi 2
or kernel8.img for Raspberry Pi 3) file.
Using FASMARM open up kernel.asm for Raspberry Pi, kernel7.asm for Raspberry Pi 2 or kernel8.asm for Raspberry Pi 3 & click the Run/Compile button.

Howto Run:
I only test with the latest bleeding edge firmware:

You will need these 2 files:

You will need to create a "config.txt" file that contains the lines:

Check http://www.raspberrypi.org/documentation/configuration/config-txt.md for more info about config options.
Check https://github.com/PeterLemon/RaspberryPi/tree/master/boot for the config.txt file.

Once you have all these files ready, you can copy them & a kernel.img (Raspberry Pi), a kernel7.img (Raspberry Pi 2)
or a kernel8.img (Raspberry Pi 3) file to the root of an SD card.

All of my demos use a maximum resolution of 640x480, they have been tested using composite & HDMI.

All sound demos output to the 3.5" Phone Jack. Thanks to ne7 for the sound sample.