User manual
Linux Guide taskit GmbH
in the folder \toolchain\gcc-3.4.1-glibc-2.3.3 of the starter-kit CD.
The compilation of a tool chain itself is labour intensive and will not be described here. The
toolchain was made with Crosstools, which simplifies the compilation considerable. Have a
look at http://kegel.com/crosstool/ for further information.
After the installation, corresponding version of binutils, gcc and c++ are available for
crosscompiling. Type ls /usr/bin | grep arm-linux to get a list of all available tools.
5.2. Mounting the working directory
After installing the tool chain, you can compile your own software for the arm processor. In
the early stages of development, it is convenient to mount the working directory on the
development system with NFS (network file system), in order to make changes available
quickly.
Installation of the NFS-server:
apt-get install nfs-common nfs-kernel-server
If an NFS server is already set up on the development system, you only need to add one
line to the /etc/exports file:
/develop *.local.domain(ro).
This line exports, for example, the /develop directory for all clients on the local domain with
read access. If this folder does not exist it has to be created:
mkdir /develop
chmod 777 /develop
The exported directory can then be mapped to a directory on the ARM-board with the
mount command.
mkdir /mnt/develop
mount -t nfs -o nolock nfs_servername:/develop /mnt/develop
5.3. Compiling the application sample
In the /examples directory on the starterkit-CD you will find the example1.c file, which
contains C sourcecode for a simple program for entering and printing text. For editing, first
copy the file to the /develop directory on the development computer. Then you can use the
cross-compiler to compile example1.c:
arm-linux-3.4.2-gcc -Wall example1.c -o example1 .
5.4. Starting the sample
If the execution rights for the newly created binary are set correctly, the program can now
be called:
cd /mnt/develop
./example1
Page 16 of 65 Version 1.26 (2008-04-30)