User`s manual
UC-7400-LX Plus User’s Manual Programmer’s Guide
5-3
UC-7400-LX Plus. The host environment must be running Linux to install the UC-7400-LX Plus
GNU Tool Chain. We have confirmed that the following Linux distribution can be used to install
the tool chain:
Fedora core 1/2/3/4/5.
The Tool Chain will need about 900 MB of hard disk space on your PC. The UC-7400-LX Plus
Tool Chain is located on the UC-7400-LX Plus CD. To install the Tool Chain, insert the CD into
your PC and then issue the following commands:
#mount –t iso9660 /dev/cdrom /mnt/cdrom
#cp /mnt/cdrom/tool-chain/linux/xscale_be_1.1.sh /tmp/
#sh /tmp/xscale_be_1.1.sh
Wait for a few minutes while the Tool Chain is installed automatically on your Linux PC. Once the
host environment has been installed, add the directory /usr/local/xscale_be/bin/ to your path and
the directory /usr/local/xscale_be/man/ to your manual path. You can do this temporarily for the
current login session by issuing the following commands:
#export PATH=“/usr/local/xscale_be/bin”:$PATH
#export MANPATH=“/usr/local/xscale_be/man”:$MANPATH
Alternatively, you can add the same commands to $HOME/.bash_profile to cause it to take effect
for all login sessions initiated by this user.
Obtaining help
Use the Linux man utility to obtain help on many of the utilities provided by the tool chain. For
example to get help on the xscale_be-gcc compiler, issue the command:
#man xscale_be-gcc
Cross Compiling Applications and Libraries
To compile a simple C application, just use the cross compiler instead of the regular compiler:
#xscale_be-gcc –o example –Wall –g –O2 example.c
#xscale_be-strip –s example
#xscale_be-gcc -ggdb –o example-debug example.c
Tools Available in the Host Environment
Most of the cross compiler tools are the same as their native compiler counterparts, but with an
additional prefix that specifies the target system. In the case of x86 environments, the prefix is
i386-linux- and in the case of UC-7400-LX Plus Xscale boards, it is xscale_be-.
For example, the native C compiler is gcc and the cross C compiler for Xscale in UC-7400-LX
Plus is xscale_be-gcc.
The following cross compiler tools are provided:
ar Manage archives (static libraries)
as Assembler
c++, g++ C++ compiler
cpp C preprocessor
gcc C compiler
gdb Debugger
ld Linker
nm Lists symbols from object files
objcopy Copies and translates object files