Skip to content

Simple bare metal programming in C on the Raspberry Pi Zero

License

Notifications You must be signed in to change notification settings

dbhicks/pi-zero-bare-metal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About this Repository

This software repository represents initial efforts to learn about bare metal programming using C and ARM assembly with the Raspberry Pi Zero as the target hardware. The binary produced is a kernel image that is intended to replace the kernel.img file that is shipped with the current Raspberry Pi firmware.

Current Status

This is a work in progress and is intended as a learning exercise more than anything. Presently, the kernel initializes a 1920x1080, 32-bit depth frame buffer and then outputs Hello, world!.

Compiling and Running

Dependencies

The code contained is intended to be cross-compiled for ARM using the GNU Embedded Toolchain for ARM, arm-none-eabi and the GNU C Compiler, gcc.

Compiling

The default make target will compile a kernel image at dist/kernel.img

Installation

The kernel image produced is intended to replace the kernel.img distributed with the Raspberry Pi. Assuming the Raspberry Pi firmware is already installed on a storage medium, installation only consists of replacing the kernel.img file with the new copy compiled from this code.

Thanks and Resources

Working in an environment without an operating system is totally new for me and I would not have been able to get very far at all without the wealth of resources available online. The resources below were invaluable for me and hopefully will be to anyone viewing this who wants to learn more about bare metal programming on the pi:

University of Cambridge - Baking Pi

VALVERS' Bare Metal Programming in C

Raspberry Pi Bare Metal Programming Forums

About

Simple bare metal programming in C on the Raspberry Pi Zero

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published