AMC 68VZ328 Accessing your dimmPCI development board via telnet, Compiling your own source code

Page 38

the typical 0.70 version of ‘dhcpcd’) which is executed when an IP is first obtained, or should the IP address change (the common operation is to execute every time an IP lease is renewed). The command is invoked with zero or more parameters. Often the command is ‘/bin/sh’, and the parameter is a script file.

If the ‘-v’ option is specified, the IP address is written to ‘stdout’ as the command file is invoked. Unlike ‘ifattach’, the IP address is not immediately obtained; the command file is executed when the IP has been obtained. At this point, network access is available; therefore it is common practice to mount network drives using the command file.

For example, the ‘/etc/rc’ file contains:

/sbin/dhcpcd -p -c /etc/dhcpcd.sh &

and the ‘/etc/dhcpcd.sh’ file contains:

echo “We have network access!” /sbin/ifconfig

mount [...]

Accessing your dimmPCI development board via telnet

If the dimmPCITM development board is connected to an IP network, it can be accessed using telnet, just like using a serial interface. To take advantage of this, the IP address of the board needs to be known. It will be stored in the ‘/etc/rc’ file in the ‘romdisk’ directory. Suppose the address of the board is 192.168.10.51. Type the following command.

telnet 192.168.10.51

A login prompt will appear. The procedure for logging in is the same as for the serial interface. Enter ‘root’ as the username, and press ‘Return’ at the password prompt. Note that the telnet access procedure is the same as that of the serial console connection.

Compiling your own source code

The cross compiler for the DragonBall processor onboard the dimmPCI module is installed along with your kernel source and file system so it should be ready for use. In the ‘dimmpci’ directory, create a new directory called source.

38

www.amctechcorp.com

Image 38
Contents DimmPCITM 68VZ328 Hardware / Software Manual DimmPCITM Software Development Kit Copyright noticeContact Information NETdimm Developers Kit Quick Start Guide Etc/issue Page This page left intentionally blank Introduction Launching Linux at the embeddedPage What’s on the CD? System RequirementsThis page left intentionally blank CPU Module FeaturesUC68VZ328 Embedded Microcontroller BackplaneGeneral Description CPU Module DescriptionBackplane Description Architecture CPU ArchitectureMemory Map MCU CoreSystem Memory Memory Memory MapLayout of the Flash and Flash Schematic Layout of the Flash Sdram Ethernet Controller Viewing the Ethernet MAC IDNETdimm Ethernet Schematic Digital I/O IOdimmDigital Output Schematic Analog Output Schematic Analog Input Schematic Digital to Analog Converter Schematic Highlights RS-232Watchdog Usage LCD Schematic LCD InterfaceDimmPCITM Signal Descriptions DimmPCITM signals for System SlotPCI Electrical Characteristics Maximum RatingsThis page left intentionally blank Builder Kit Installing the dimmPCI TM SystemInstallation Before beginningConfiguring and compiling the µClinux kernel Creating a ROM image Customizing the filesystemAccessing your dimmPCI development board via the serial port Dynamic IP Accessing the NetworkStatic IP Accessing your dimmPCI development board via telnet Compiling your own source codeUsing NFS to streamline the development cycle Home directory/dimmpci/source Updating Applications on your dimmPCI module MethodThis page left intentionally blank Programming the uC68VZ328 LoaderOops Cd /opt/boottools/oops Oops -p /dev/ttyS0 -k kernel.bin Page Page This page left intentionally blank Appendix Sample CodeClose the file afterwards fclose filehandle Page Longwatchdogid #include unistd.h #include stdio.h int main void This page left intentionally blank Journalling Flash File System Umount /usr Sbin/mkjffs /dev/flash0 Page This page left intentionally blank Development Tool Chains Normal Usage of the PIC-COFFTool Chain Page This page left intentionally blank D1 Application Note IntroductionKernel and Filesystem Configuration Kernel and Filesystem Configuration Flow Chart YESAvailable Digital I/O Pins List of all available digital I/O pins Programming Structure Dimmio structure descriptionDigital I/O Functions Page Sample Programs In0 In1 In2 In3 In4 In5 In6 In7 Out0 Even ParityMknod io1 c 123 Page This page left intentionally blank D2 Application Note AbstractKernel Configuration RequirementsAgain, from the main menu under Network device support Kernel Configuration Flow Chart AtCommandPrompt Filesystem Configuration Cd /opt/filesystem name make clean Make Filesystem Configuration Flow Chart Modifications to ‘rc’ fileHost machine Configuration TestingPage This page left intentionally blank Using Multiple NETdimm Modules Application NoteSimple Server & Client Inetd based Server & ClientPage This page left intentionally blank Using Analog and Digital I/O with IOdimmCd /opt Cp -Rpdx newfs iodimmmfs ADC MAX1203 Available I/O Pins Category Channel Backplane System Backplane Header Slot PinFunctions Digital Inputs and Outputs+ Κ Iodimm/dio Samples/cardspecific/iodimm/dio Page This page left intentionally blank Using Oops Purpose & basic format of files for oopsUpload & Flash Upload & Run DownloadCommon oops program arguments Appendix This page left intentionally blank 104 Preamble Licensing, Copyrights & LiabilityDimmPCITM Software Development Kit Distribution 106 107 108 109 No Warranty Appendix How to Apply These Terms to Your New Programs111 112 113 This page left intentionally blank 114 References/ Suggested Reading