Computer Laboratory

Raspberry Pi


This page contains download links for the GNU toolchains, as well as the model answers to each lesson.

1 GNU Toolchain

1.1 Microsoft Windows

For Microsoft Windows, I use the YAGARTO and MinGW packages.

Please visit the YAGARTO website and download and install YAGARTO Tools and YAGARTO GNU ARM toolchain for Windows. MinGW can be downloaded from here. You may need to restart your computer for this to work (honestly).

Note: YAGARTO must be installed to a path with no spaces, e.g. 'C:\YAGARTO\' not 'C:\Program Files\YAGARTO\'.

1.2 Mac OS X

For Mac OS X, I use the YAGARTO packages.

Please visit the YAGARTO website and download and install YAGARTO GNU ARM toolchain for Mac OS X.

1.3 Linux

Use the following commands:

$ wget
--2012-08-16 18:26:29--
Resolving (, 2001:630:212:267::80:14
Connecting to (||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 32108070 (31M) [application/x-bzip2]
Saving to: `arm-none-eabi.tar.bz2'

100%[======================================>] 32,108,070   668K/s   in 67s

2012-08-16 18:27:39 (467 KB/s) - `arm-none-eabi.tar.bz2' saved [32108070/32108070]

$ tar xjvf arm-none-eabi.tar.bz2

$ export PATH=$PATH:$HOME/arm-2008q3/bin

2 OS Template

The OS Template file is one I have created which contains enough instructions for the compiler to create a basic Operating System for the Raspberry Pi. It contains no actual assembly code, just a Makefile script and a Linker script.

Download Template.

Download Template for USB Operating System.

3 Lesson Solutions

3.1 Lesson 1: OK01

Full Solution

3.2 Lesson 2: OK02

Full Solution

3.3 Lesson 3: OK03

Full Solution

Extension Solution

3.4 Lesson 4: OK04

Full Solution

3.5 Lesson 5: OK05

Full Solution

3.6 Lesson 6: Screen01

Full Solution

3.7 Lesson 7: Screen02

Full Solution

3.8 Lesson 8: Screen03

Full Solution

3.9 Lesson 9: Screen04

Full Solution

3.10 Lesson 10: Input01

Lesson Template

Full Solution

3.11 Lesson 11: Input02

Full Solution

4 Example Operating Systems

Here are some example operating systems for you to learn from. If you've coded an operating system that you think others could benefit from, please email me at

Table 4.1 Example Operating Systems
Coloured CLIAlex ChadwickThis example is a small extension to Input01, featuring a coloured text terminal, rather than a black and white one. Special characters are used to change the colour.
Pascal OSsMarten van der HoningA few small OSs written is Pascal based on this course, and beyond.

5 Fonts

Below are some fonts for you to use in your Operating Systems.

5.1 Monospace, Monochrome 8x16

These fonts are the simplest ones available. They use a 1 to represent a white pixel, a 0 to represent a black pixel, and having representations for the first 128 ASCII characters. The use 16 bytes per character, arranged such that each byte is one complete row, going right to left with higher bits, going top to bottom with later bytes.

The tutorial used to suggest these fonts were stored in the opposite direction along the rows. The lowest bit is the rightmost pixel, the highest bit is the leftmost.

Table 5.1.1 Monospace, Monochrome 8x16 Fonts
Font Image License
Monospace Default Default Monospace Preview Free to use/redistribute commercially. Cannot be titled 'Bitstream' or 'Vera'.
Liberation Mono Liberation Mono Preview SIL Open Font License.
Liberation Serif Mono Liberation Mono Preview SIL Open Font License.

6 USB driver (CSUD) Source

The source code for CSUD (Chadderz's Simple USB driver) used in the tutorials is available here: