Moxa ioPAC 8500-5-M12-C-T [29/69] Moxa c programmable rtu controllers getting started

Moxa ioPAC 8500-9-RJ45-C-T [29/69] Moxa c programmable rtu controllers getting started
Moxa C Programmable RTU Controllers Getting Started
2-17
Installing the Tool Chain (Linux)
The Linux Operating System must be pre-installed in the host PC before installing the RTU controllers GNU Tool
Chain. Fedora Core or compatible versions are recommended. The Tool Chain requires approximately 150 MB
of hard disk space on your PC. The RTU controllers Tool Chain software is located on the attached Document
and Software CD. To install the Tool Chain, insert the CD into your PC and then issue the following commands:
#mount/dev/cdrom /mnt/cdrom
#sh /mnt/cdrom/Software/toolchain/arm-linux_3.3.2_V1.X_BuildXXXXXXXX.sh
(ioPAC 8020 & ioLogik W5348 V1.4->
#sh /mnt/cdrom/Software/toolchain/arm-linux_V1.X_BuildXXXXXXXX.sh)
The Tool Chain will be installed automatically on the host Linux PC within a few minutes. Before compiling the
program, be sure to set the following path first, since the Tool Chain files (including the compiler, link, and
library) are located in this directory.
PATH=/usr/local/arm-linux/bin:$PATH
Setting the path allows you to run the compiler from any directory.
Checking the Flash Memory Space
If the flash memory is full, you will not be able to save data to the Flash ROM. Use the following command to
calculate the amount of “Available” flash memory:
/>df –h
If there isn’t enough “Available” space for users program, users must delete some existing files. To do this,
connect the host PC to the RTU controller with the console cable, and then use the console utility to remove the
none-using files from the flash memory. To check the amount of available space, look at the directories in the
read/write directory /dev/mtdblock3. Note that the directories /home and /etc are both mounted on the
directory /dev/mtdblock3.
NOTE
If the flash memory is full, users must
release some memory space before saving files to the Flash ROM.
Compiling Hello.c
The Software and Document CD contains an example Hello.c program allowing users to run pilot tests to the
RTU controller. Type the following commands from the host PC to copy the files used for this example.
# cd /tmp/
# mkdir example
# cp r /mnt/cdrom/example/hello/* /tmp/example
To compile the program, go to the Hello subdirectory and issue the following commands:
# cd example/hello
# make
Users should see the following response:

Содержание

Скачать