User`s manual
UC-7400-LX Plus User’s Manual Getting Started
2-15
You should receive the following response:
[root@localhost hello]# make
xscale_be-gcc –o hello-release hello.c
xscale_be-strip –s hello-release
xscale_be-gcc –ggdb -o hello-debug hello.c
[root@localhost hello]# _
Next, execute make to generate hello-release and hello-debug, which are described below:
hello-release—an IXP platform execution file (created specifically to run on the UC-7400-LX
Plus)
hello-debug—an IXP platform GDB debug server execution file (see Chapter 5 for details about
the GDB debug tool).
NOTE
Be sure to type the #make command from within the /tmp/example/hello directory, since UC’s
tool chain puts a specially designed Makefile in that directory. This special Makefile uses the
mxscale-gcc compiler to compile the hello.c source code for the Xscale environment. If you type
the #make command from within any other directory, Linux will use the x86 compiler (for
example, cc or gcc).
Refer to Chapter 5 to see a Make file example.
Uploading and Running the “Hello” Program
Use the following command to upload hello-release to the UC-7400-LX Plus via FTP.
1. From the PC, type:
#ftp 192.168.3.127
2. Use the bin command to set the transfer mode to Binary mode, and then use the put command
to initiate the file transfer:
ftp> bin
ftp> put hello-release
3. From the UC-7400-LX Plus, type:
# chmod +x hello-release
# ./hello-release
The word Hello will be printed on the screen.
root@Moxa:~# ./hello-release
Hello
Developing Your First Application
We use the tcps2 example to illustrate how to build an application. The procedure outlined in the
following subsections will show you how to build a TCP server program with serial port
communication that runs on the UC-7400-LX Plus.
Testing Environment
The tcps2 example demonstrates a simple application program that delivers transparent,
bi-directional data transmission between the UC-7400-LX Plus serial and Ethernet ports. As
illustrated in the following figure, the purpose of this application is to transfer data between PC 1
and the UC-7400-LX Plus through an RS-232 connection. At the remote site, data can be
transferred between the UC-7400-LX Plus’s Ethernet port and PC 2 over an Ethernet connection.