Raspberry Pi ARM based bare metal examples
FreeFreeFree tier
About Raspberry Pi ARM based bare metal examples
A GitHub repository by dwelch67 offering a comprehensive collection of low-level (bare metal) examples for ARM-based Raspberry Pi boards. Written in assembly and C, these examples run without an operating system and cover topics such as GPIO blinking, UART communication, SPI, bootloaders, MMU, JTAG, and more. The repository targets multiple Raspberry Pi models including the original Pi 1 (ARM11), Pi 2 (Cortex-A7), Pi 3 (Cortex-A53), Pi Zero, and variants. It serves as an educational resource for bare-metal programming and embedded systems development. The README acknowledges the repo's organic growth and recommends the 'boards' directory for newer examples.
Key Features
Collection of bare-metal examples for Raspberry Pi (no OS)
Supports Raspberry Pi 1 (ARM11), Pi 2 (Cortex-A7), Pi 3 (Cortex-A53), Pi Zero, and variants
Examples include GPIO blinker, UART, SPI, bootloader, MMU, JTAG, floating point, video, and more
Includes aarch64 (64-bit) examples for Pi 3
Covers peripheral differences (e.g., base addresses, GPIO locations) across board revisions
Open source under an individual developer's repository on GitHub
Pros & Cons
Pros
- Comprehensive collection covering many peripherals and Pi variants
- Educational focus with real hardware examples
- Open source and free to use
- Includes both 32-bit and 64-bit ARM examples
- Active community (2.8k stars, 484 forks)
Cons
- Repository organization is messy and not consistently updated for newer boards
- Limited documentation and comments in some examples
- Requires prior knowledge of ARM assembly and embedded concepts
- Some examples are legacy and may not work on latest Pi models without adaptation
Best For
Learning ARM bare-metal programming and embedded systemsTeaching low-level hardware interaction on Raspberry PiPrototyping custom bootloaders or kernel.img filesUnderstanding hardware differences across Raspberry Pi generationsAcademic projects and hobbyist electronics
FAQ
What Raspberry Pi models are supported?
The repository includes examples for Raspberry Pi 1 (ARM11/Broadcom BCM2835), Pi 2 (Cortex-A7/BCM2836), Pi 3 (Cortex-A53/BCM2837), Pi Zero, Pi A+, Pi B+, and Pi 2 B. The README notes that the main directory targets older Pi 1 boards, while the 'boards' directory is recommended for newer variants. Separate repos (raspberrypi-zero, raspberrypi-three) exist for specific models.
What programming languages are used?
Examples are written in ARM assembly (both A32 and A64) and C. The repository includes build scripts and Makefiles for cross-compilation on Linux.
Is this repository affiliated with the Raspberry Pi Foundation or Broadcom?
No. The author explicitly states they are not associated with the Raspberry Pi organization or Broadcom. The project is a personal collection of examples shared for educational purposes.
How do I get started?
The README recommends starting with the 'boards' directory for newer examples. To run an example, you need to build it (cross-compile for ARM) and copy the resulting kernel.img (or kernel7.img for Pi 2) to an SD card. The repository includes buildgcc and other build scripts, but assumes a Linux environment with an ARM toolchain.