Moxa DA-662A-I-16-LX [15/63] Checking the flash memory space

Moxa DA-662A-I-8-LX [15/63] Checking the flash memory space
DA-662A Series Software Getting Started
2-7
Installing the Tool Chain (Linux)
The PC must have the Linux Operating System pre-installed before installing the DA-662A series GNU Tool
Chain. Redhat 7.3/8.0, Fedora core, Debian 7 and later compatible versions are recommended. The Tool Chain
requires about 1 GB of hard disk space on your PC. The DA-662A series Tool Chain software is located on the
DA-662A series CD. To install the Tool Chain, insert the CD into your PC and then issue the following
commands:
#mount /dev/cdrom /mnt/cdrom
#./mnt/cdrom/Toolchain/arm-linux_4.4.2-vX.X.X_Build_YYMMDDHH.sh
The Tool Chain will be installed automatically on your 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, library,
and include files are located in this directory.
#export PATH=/usr/local/arm-linux-4.4.2-v4/bin:$PATH
Setting the path allows you to run the compiler from any directory.
Checking the Flash Memory Space
The DA-662A series uses a specially designed root file system. Only the /tmp, /etc, /home, and /root
directories are writable. Others are read-only. The writable directories are mounted on /dev/mtdblock3. If
the /dev/mtdblock3 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
root@Moxa:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 12.0M 9.2M 2.8M 77% /
devtmpfs 61.0M 0 61.0M 0% /dev
/dev/ram0 1003.0K 22.0K 930.0K 2% /var
/dev/cfa1 1.6G 1021.8M 509.9M 67% /var/cf
/dev/mtdblock3 16.0M 860.0K 15.2M 5% /tmp
/dev/mtdblock3 16.0M 860.0K 15.2M 5% /home
/dev/mtdblock3 16.0M 860.0K 15.2M 5% /etc
root@Moxa:~#
If there isn‘t enough ―Available‖ space for your application, you will need to delete some existing files. To do
this, use the console cable to connect your PC to the DA-662A series, and then use the console utility to delete
the files from the DA-662A series‘ flash memory.
Compiling Hello.c
The CD included with the product contains several example programs. Here we use Hello.c as an example to
show you how to compile and run your applications. Type the following commands from your PC to copy the
files used for this example from the CD to your computer‘s hard drive:
# cd /tmp/
# mkdir example
# cp r /mnt/cdrom/example/* /tmp/example
To compile the program, go to the Hello subdirectory and issue the following commands:
#cd example/hello #make

Содержание

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

Скачать