User`s manual

UC-7112-LX Plus Software User’s Manual Getting Started
2-9
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 your application, you will need to delete some existing
files. To do this, connect your PC to the UC-7112-LX Plus with the console cable, and then use
the console utility to delete the files from the UC-7112-LX Plus’s flash memory. To check the
amount of free space available, 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, you will need to free up some memory space before saving files to
the Flash ROM.
Compiling Hello.c
The package CD 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
You should receive the following response:
[root@localhost hello]# make
/usr/local/arm-linux/bin/arm-linux-gcc –o hello-release hello.c
/usr/local/arm-linux/bin/arm-linux-strip –s hello-release
/usr/local/arm-linux/bin/arm-linux-gcc –ggdb -o hello-debug hello.c
[root@localhost hello]# _
Next, execute make to generate hello-release and hello-debug, which are described below:
hello-release—an ARM platform execution file (created specifically to run on the UC-7112-LX
Plus)