4. Setting up a development system

The development system described here assumes that your device is connected to a separate development computer, using either Ethernet or a serial cable. All transfers between the two systems occur exclusively over this connection. The development system does not have any particular hardware demands; a standard PC is in most cases sufficient. A Linux workstation is normally used as a development computer for an embedded Linux device. A network card and serial interface are required for the connection.

As a basis for such a host system, taskit recommends and supports the freely available Debian Linux distribution for development. Debian stands out for its stability and good packet management. Several ways to acquire Debian are described at http://www.debian.org/distrib/. For complete installation instructions for the i386 architecture, see http://www.debian.org/releases/stable/i386/install. The following descriptions relate to such a Debian system.

You could also run a Linux system in a virtual environment using a virtual machine such as VMWare, VirtualPC or VirtualBox. This solution, however, severely limits performance and usability.

The following sections assume that you do all your development in the path /develop. You can of course use a different path, but you have to adjust all the paths accordingly.

To create it just issue the following command with root rights:

mkdir /develop

Now change the permissions to be able to use it with your normal user account, e.g.

chown developer /develop

if your user account is called developer.

If you want to share this directory with other users, change the group of it:

chgrp users /develop
chmod 775 /develop

This allows all users in the group users (which are all users on Debian by default) to access the directory with read and write permissions.

1. Installing the toolchain

A toolchain for cross compiling is the most important element of the development system. Precompiled binaries for the i386 architecture are on the Starterkit CD. You can find it in the toolchain directory, e.g. angstrom-2009.X-stable-armv5te-linux-gnueabi-toolchain.tar.bz2. To install it, mount the CD and enter the following commands:

tar -xvjf angstrom-2009.X-stable-armv5te-linux-gnueabi-toolchain.tar.bz2 -C /

For the Stamp9G45, the toolchain is available for 32-bit and 64-bit x86 systems. Choose the corresponding file from the Stamp9G45 toolchain folder and extract it like in the previous example.

The toolchain will be installed into the directory /usr/local/angstrom or similar depending on the product and architecture.

The compilation of a toolchain itself is labour intensive and will not be described here. The toolchain was made with OpenEmbedded (using the Ångström distribution), which simplifies the compilation considerably. For more information on OpenEmbedded consult Chapter 7, Creating a new root filesystem.

Additionally, further tools might be needed (e.g. make). To get the basic tools install the package build-essential.

apt-get install build-essential