第4章 Development Environment Set-up

This chapter explains how to set up a software development environment for Armadillo on a work PC.

A Debian based Linux environment[7] (Debian/GNU Linux 5.0 codename Lenny is standard) is required to undertake software development for the Armadillo-400 Series.

If the work PC is Windows, a virtual Linux environment must be set up within Windows.

"VMware" is the recommended way to set up a Linux environment on Windows. An operating system image called ATDE (Atmark Techno Development Environment)[8] is available with the required development software pre-installed.

Please refer to the "ATDE Install Guide" for information on setting up a Linux environment on Windows.

As the basic development environment is pre-installed, there is no need to carry out the operations listed in 「Installing Cross Development Environment Packages」 and 「Installing Packages Required for Atmark-Dist Builds」 when using ATDE.

4.1. Installing Cross Development Environment Packages

Debian (deb) packages are used for application and library management on Debian based Linux systems.

In order to carry out cross development, toolchain packages for cross development and library packages for the target architecture which have been converted for cross development use must be installed on the work PC.

On Debian based Linux systems there are two ARM architectures: arm and armel. The difference between these two lies in the ABI (Application Binary Interface), with the arm architecture using OABI, and the armel architecture using EABI.

As EABI is the standard ABI on the Armadillo-400 Series, Debian armel packages must be installed.

The cross development environment packages are stored on the included DVD under the cross-dev/deb/ directory. For development with the Armadillo-400 Series, please install the ARM EABI cross development packages in the armel directory.

The install must be carried out as a root user. The deb packages are installed by executing the command shown in 図4.1「Install Command」.

[PC ~]$ sudo dpkg --install *.deb

図4.1 Install Command


[ティップ]

sudo is used to execute the specified command as a different user. The above command line executes the dpkg command as the root user.

A password is requested after executing the sudo command. This is the password of the user executing the command, and not the root password.

[警告]

If a cross development environment for the same target architecture has been previously installed in the Linux environment, please make sure to uninstall this existing environment before installing the new cross development environment.

4.2. Installing Packages Required for Atmark-Dist Builds

Atmark-Dist is the default distribution for Armadillo. The packages listed in 表4.1「List of Packages Required for Atmark-Dist Builds」 must be installed on the work PC in order to build Atmark-Dist.

表4.1 List of Packages Required for Atmark-Dist Builds

Package NameVersion
genext2fs1.4.1-2.1 or later
file4.26-1 or later
sed4.1.5-6 or later
perl5.10.0-19lenny2 or later
bison1:2.3.dfsg-5 or later
flex2.5.35-6 or later
libncurses5-dev5.7+20081213-1 or later

The currently installed version can be displayed by specifying the package name when executing the command shown in 図4.2「Installed Version Display Command」.

--list is an option to dpkg used to display package information. The package name pattern for the package to be displayed is specified in place of package-name-pattern.

[PC ~]$ dpkg --list [package-name-pattern]

図4.2 Installed Version Display Command


4.3. Installing Cross Development Library Packages

When building applications or libraries not included in Atmark-Dist, library packages that are neither available in the included DVD or from the download site may be required. The following is an introduction on how to create and install the required cross development library packages.

First, the library package on which the cross development package will be based on must be acquired. The package architecture must match the target and the Debian distribution version should match that of the development environment. For the Armadillo-400 Series, the architecture is armel and the Debian distribution version is lenny (the stable version as at March, 2010).

For example, for the libjpeg62 library the package name will be libjpeg62_[version]_armel.deb.

Debian packages can be searched for and downloaded from the Debian Packages site[9].

Once the library package has been obtained, it is then converted for cross development use with the dpkg-cross command.

[PC ~]$ dpkg-cross --build --arch armel libjpeg62_[version]_armel.deb
[PC ~]$ ls
libjpeg62-armel-cross_[version]_all.deb libjpeg62_[version]_armel.deb

図4.3 Cross Development Library Package Creation


The created cross development library package is then installed.

[PC ~]$ sudo dpkg -i libjpeg62-armel-cross_[version]_all.deb

図4.4 Installing Cross Development Library Packages


[警告]

If the dpkg-cross command is used in environments other than Debian Lenny, there may be times when an installable package cannot be created.

By using apt-cross, all of the above steps can be performed with just one command.

[PC ~]$ apt-cross --arch armel --suite lenny --install libjpeg62

図4.5 apt-cross Command


The target architecture is specified after the --arch option, and the Debian distribution version after --suite. When --install is specified, apt-cross automatically installs the converted package. The package name is specified as the last parameter.



[7] While it is possible to use Linux distributions other than Debian, not all operations listed in this document will work in the same way. The reader will be required to modify the listed operations to suit their Linux environment when using other distributions.

[8] ATDE v3.0 or later is the recommended development environment for the Armadillo-400 Series.

[9] http://www.debian.org/distrib/packages