DA-660-8/16-LX User’s Manual
Getting Started
2-6
Auto eth0 eth1 lo
iface lo inet loopback
iface eth0 inet dhcp
iface eth1 inet dhcp
3.
After modifying the boot settings of the LAN interface, issue the following command to
activate the LAN settings immediately:
#/etc/init.d/networking restart
NOTE
After changing the IP settings, use the
networking restart
command to activate the new IP
address. However, the LCM display will still show the old IP address. To update the LCM display,
you will need to reboot the DA-660.
Modifying Network Settings over the Network
IP settings can be activated over the network, but the new settings will not be saved to the flash
ROM without modifying the file
/etc/network/interfaces
.
For example, type the command
#ifconfig eth0 192.168.1.1
to change the IP address of LAN1 to
192.168.1.1.
root@Moxa:~# ifconfig eth0 192.168.1.1
root@Moxa:~#
Test Program—Developing Hello.c
In this section, we use the standard
Hello
programming example to illustrate developing a program
for the DA-660. In general, program development for DA-660 involves the following seven steps.
Step 1:
Connect the DA-660 to a Linux PC.
Step 2:
Install 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 DA-660 via 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 DA-660 units if needed).
6
8
x
Cross
Compiler