96
•
Step-by-Step Guide to your own Linux Application
Installation of the Development Toolchain
WAGO-I/O-SYSTEM
750
Linux Fieldbus Coupler
5 Step-by-Step Guide to your own Linux Application
This chapter will guide you step by step, to create your own Linux application.
First it will guide through the installation of the toolchain on the development
computer. Then, after the toolchain is installed this document shows how to
create and compile an application. The final step will load the application and
run it on the Linux fieldbus coupler.
5.1 Installation of the Development Toolchain
To create uClinux or Linux applications you require a toolchain. Basically,
you can compile a toolchain yourself. However, this requires profound
knowledge about the individual GNU components, the specific charcteristics
of the different versions as well as their interdependencies. Since the effort is
disproportionate to the results, we recommend the use of the toolchains that
have already been compiled. For the Linux fieldbus coupler this is the so-
called arm-elf toolchain.
Usually, your own applications will run in the user space; it is also possible to
run drivers/programs in the kernel space, however, it is essential to know the
hardware and driver programming (book recommendation: Linux Device
Drivers by Rubini & Corbet, published by O’REILLY).
If you want to change or to compile the boot loader (U-Boot), you have to
install a second toolchain.
A pre-compiled version of the arm-elf toolchain for x86 systems is availabale
under http://www.uclinux.org/pub/uClinux/m68k-elf-tools/, or on the Wago
distribution CD under CD:/linux/toolchain/.
The installation requires super user privileges.
> su
Change into super user mode (enter password)
># cd /media/cd-rom/linux/toolchain
Change directory (in S.U.S.E, a CD drive is mounted in /media/cd-rom if it
was linked via Konqueror, for example)
># sh install.sh
Call installation script
># exit
Exit super user mode