Moxa DA-662A-I-16-LX [17/63] Compiling tcps2 c

Moxa DA-662A-I-8-LX [17/63] Compiling tcps2 c
DA-662A Series Software Getting Started
2-9
Testing Environment
The tcps2 example demonstrates a simple application program that delivers transparent, bi-directional data
transmission between the DA-662A series‘ serial and Ethernet ports. As illustrated in the following figure, the
purpose of this application is to transfer data between PC 1 and the DA-662A series via an RS-232 connection.
At the remote site, data can be transferred between the DA-662A series‘ Ethernet port and PC 2 over an
Ethernet connection.
Compiling tcps2.c
The source code for the tcps2 example is located on the CD-ROM at
CD-ROM://example/TCPServer2/tcps2.c. Use the following commands to copy the file to a specific
directory on your PC. We use the direrctory /home/1st_application/. Note that you need to copy 3
filesMakefile, tcps2.c, tcpsp.cfrom the CD-ROM to the target directory.
#mount /dev/cdrom /mnt/cdrom
#cp /mnt/cdrom/example/TCPServer2/tcps2.c /home/1st_application/tcps2.c
#cp /mnt/cdrom/example/TCPServer2/tcpsp.c /home/1st_application/tcpsp.c
#cp /mnt/cdrom/example/TCPServer2/Makefile.c /home/1st_application/Makefile.c
Type #make to compile the example code:
You will see the following response, indicating that the example program was compiled successfully.
root@server11:/home/1st_application
[root@server11 1st_application]# pwd
/home/da661/662663/1st_application
[root@server11 1st_application]# 11
total 20
-rw-rr-- 1 root root 514 Nov 27 11:52 Makefile
-rw-rr-- 1 root root 4554 Nov 27 11:52 tcps2.c
-rw-rr-- 1 root root 6164 Nov 27 11:55 tcps2.c
[root@server11 1st_application]# make_
arm-none-linux-gnueabi-gcc -o tcps2-release tcps2.c
arm-none-linux-gnueabi-strip s tcps2-release
arm-none-linux-gnueabi-gcc -o tcpsp-release tcpsp.c
arm-none-linux-gnueabi-strip s tcpsp-release
arm-none-linux-gnueabi-gcc ggdb -o tcps2-debug tcps2.c

Содержание

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

Скачать