240Chapter8 • Cross-Platform and Embedded Systems Development
that run on one type of machine but are used to carry out some service for
another type of machine. For example, a cross compiler is a compiler that
creates executable code for a machine which is different than the machine
on which the compiler is running. Similar is the case with cross assem-
blers, cross debuggers and so on. On the other hand, a native tool provides
a service to the same machine on which it is running. For example, a
native compiler generates output code that is executable on the same
machine on which the compiler runs.
8.1Introduction to the Cross-Platform Development Process
You need a general-purpose computer for software development. This computer hosts develop-
ment tools. In most cases, the computer also hosts some debugging tools. The executable code
may be generated for the same computer on which you develop software or for some other
machine that is not capable of running development tools (editors, compilers, assemblers,
debuggers etc.). Most of the time host and target machines differ so that programs built on the
host machine can’t be run on the target machine. These differences may take many forms. Some
common differences between host and target machines are different operating system, different
system boards or a different CPU.
It’s necessary to understand some basic concepts and terminology related to cross-plat-
form development. These basic concepts are explained in the following subsections.
8.1.1Host Machine
The host machine is the machine on which you write and compile programs. All of the
development tools are installed on this machine. Most of the time this is your PC or workstation.
Your compiler is built to run on this machine. When you are satisfied with your code, the execut-
ables are built and transferred to the target machine. If the host and target machines are different,
the final executable can’t be executed on the host machine where you built it.
8.1.2Target Machine
A target machine may be another general-purpose computer, a special-purpose device
employing a single-board computer or any other intelligent device. Usually the target machine is
not able to host all the development tools. That is why a host computer is used to complete
development work.
Debugging is an important issue in cross-platform development. Since you are usually not
able to execute the binary files on the host machine, they must be run on the target machine. The
debugger, which is running on the host machine, has to talk to the program running on the target
machine. GNU debugger is capable of connecting to remote processes. Some CPUs have a
JTAG or BDM connector, which can also be used to connect to processes on remote systems.
Next Page >>
<< Previous Page
Back to the Table of Contents