Fork me on GitHub

2. Setting up the ARM Lab

This section shows how to setup a simple ARM development and testing environment in your PC, using Qemu and the GNU toolchain. Qemu is a machine emulator capable of emulating various machines including ARM based machines. You can write ARM assembly programs, compile them using the GNU toolchain and execute and test them in Qemu.

2.1. Qemu ARM

Qemu will be used to emulate a PXA255 based connex board from Gumstix. You should have at least version 0.9.1 of Qemu to work with this tutorial.

The PXA255 has an ARM core with a ARMv5TE compliant instruction set. The PXA255 also has several on-chip peripherals. Some peripherals will be introduced in the course of the tutorial.

2.2. Installing Qemu in Debian

This tutorial requires qemu version 0.9.1 or above. The qemu package available in Debian Squeeze/Wheezy, meets this requirement. Install qemu using apt-get.

$ apt-get install qemu

2.3. Installing GNU Toolchain for ARM

  1. Folks at CodeSourcery (part of Mentor Graphics) have been kind enough to make GNU toolchains available for various architectures. Download the GNU toolchain for ARM, available from from
  2. Extract the tar archive, to ~/toolchains.

    $ mkdir ~/toolchains
    $ cd ~/toolchains
    $ tar -jxf ~/downloads/arm-2008q1-126-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
  3. Add the toolchain to your PATH.

    $ PATH=$HOME/toolchains/arm-2008q1/bin:$PATH
  4. You might want to add the previous line to your .bashrc.