beautypg.com

Compiling hello.c, Compiling hello.c -9 – Moxa Technologies EM-1240-LX User Manual

Page 25

background image

EM-1240-LX User’s Manual

Getting Started

2-9

Step 3: Click [Next] to select the local package files directory, and then click [Browse…] to select
where your installation source is. The default path is the location of the “setup.exe” file.

Step 4: Click [Next] to begin the package installation. You will see a progress bar that appears to
check the MD5 status of each software package. Click [Next] to let the installer finish the
installation.

ATTENTION

You can download the Tool Chain from Moxa’s website (go 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/arm-elf/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