User`s manual
Moxa C Programmable RTU Controllers Getting Started
2-16
hello-debug—An ARM platform GDB debug server execution file (see Chapter 5 for details)
NOTE
Since the Moxa’s tool chain places a specially designed Makefile in the directory
/tmp/example/ hello
, be
sure to type the
#make command from within that directory. If users type the #make command from any
other directory, the host Linux PC ma
y use other system compilers (for example, cc or gcc) and resulting
errors.
Uploading and Running the “Hello” Program
1. Use the following commands to upload hello-release to the RTU controller by FTP.
From the PC, type:
#ftp 192.168.127.254
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> cd /home
ftp> put hello-release
3. From the Moxa RTU, type:
# chmod +x hello-release
# ./hello-release
The word Hello will be printed on the screen.
root@Moxa:~# ./hello-release
Hello
To run the program automatically after system starts, modify the rc.local file at /etc/rc.d as follows,
Modify the /home/autoexec.sh will also be OK.