Moxa EM-1220-LX [23/57] Installing the em 1240 lx tool chain

Moxa EM-1240-LX [23/57] Installing the em 1240 lx tool chain
EM-1240-LX User’s Manual Getting Started
Installing the EM-1240-LX Tool Chain
Linux
The PC must have the Linux Operating System pre-installed to install the EM-1240-LX Linux
GNU Tool Chain. Debian 3.0R-Woody, Redhat 7.3/8.0 and compatible versions are recommended.
The Tool Chain requires about 100 MB of hard disk space (on your PC). The EM-1240-LX Tool
Chain can be found on the EM-1240-LX Document & Software CD. To install the Tool Chain,
insert the CD into your PC and then issue the following command:
#mount –t iso9660 /dev/cdrom /mnt/cdrom
Next, run the following script from the root to install the compilers, linkers, and libraries in the
/usr/local directory:
#sh /mnt/cdrom/tool-chain/linux/installer/arm-elf-moxa-toolchain-1.1.sh
The Tool Chain installation will take a few minutes to complete.
ATTENTION
The Tool Chain can be downloaded from Moxa’s website. To do this, navigate to the
EM-1240-LX product page, click the Documentation & Drivers link, and then click Go under
Driver & Software Downloads.
Compiling Hello.c
The Tool Chain path is:
PATH=/usr/local/bin:$PATH
The EM-1240-LX CD includes several example programs. We use Hello.c to illustrate how to
compile and run applications.
Issue the following commands from your PC to compile Hello.c:
# cd /tmp/
# mkdir example
# cp –r /mnt/cdrom/example/* /tmp/example
Go to the Hello subdirectory, and then issue the command #make to compile Hello.c. Finally,
execute the program to generate hello and hello.gdb.
2-7

Содержание

Похожие устройства

Скачать