User`s manual
UC-7112-LX Plus Software User’s Manual Getting Started
2-8
Test Program—Developing Hello.c
In this section, we use the standard “Hello” programming example to illustrate how to develop a
program for the UC-7112-LX Plus. In general, program development involves the following seven
steps.
Step 1:
Connect the UC-7112-LX Plus to a Linux PC.
Step 2:
Install the Tool Chain (GNU Cross Compiler & glibc).
Step 3:
Set the cross compiler and glibc environment variables.
Step 4:
Code and compile the program.
Step 5:
Download the program to the UC-7112-LX Plus by
FTP or NFS.
Step 6:
Debug the program
Æ If bugs are found, return to Step 4.
Æ If no bugs are found, continue with Step 7.
Step 7:
Back up the user directory (distribute the program to
additional UC-7112-LX Plus units if needed).
68x
Cross
Compiler
P1 P2
TX
RX
P1
P2
TX
RX
Ready
RESET
12-48V
LAN1
RS-232/422/485
Socket Inside
LAN2
UC-7112 Plus
Universal Communicator
Installing the Tool Chain (Linux)
The Linux Operating System must be pre-installed in the PC before installing the UC-7112-LX
Plus GNU Tool Chain. Fedora core or compatible versions are recommended. The Tool Chain
requires approximately 100 MB of hard disk space on your PC. The UC-7112-LX Plus Tool Chain
software is located on the UC-7112-LX Plus CD. To install the Tool Chain, insert the CD into
your PC and then issue the following commands:
#mount /dev/cdrom /mnt/cdrom
#sh /mnt/cdrom/tool-chain/uc-7112-LX_plus/linux/install.sh
The Tool Chain will be installed automatically on your Linux PC within a few minutes. Before
compiling the program, be sure to set the following path first, since the Tool Chain files, including
the compiler, link, library, and include files are located in this directory.
PATH=/usr/local/arm-linux/bin:$PATH
Setting the path allows you to run the compiler from any directory.