User`s manual

148 digi.com File Systems
10.2.3 More Sample Programs
This section studies blocking sample FAT_SHELL.C and non-blocking sample FAT_NB_Costate.c
More sample programs are in the Dynamic C folder Samples\FileSystem\FAT. For example, there
is udppages.c, an application that shows how to combine HTTP, FTP and zserver functionality to cre-
ate web content than can be updated via FTP.
As described in Section 10.2.2, you will need a target board or core module with a supported flash device,
powered up and connected to a serial port on your PC through the programming cable.
10.2.3.1 Blocking Sample
The sample program Samples\FileSystem\FAT_SHELL.C allows you to use the FAT library by
entering DOS-like or Unix-like commands. To run this sample, open Dynamic C, then open
FAT_SHELL.C. Compile and run FAT_SHELL.C by pressing F9. If the flash device has not been for-
matted and partitioned, FAT_SHELL.C will format and partition the flash device, and then you will be
prompted to run FAT_SHELL.C again (just press F9 when prompted). A display similar to the one shown
in Figure 1 will open in the Dynamic C Stdio window.
Optional parameters are denoted by the square braces [ and ] following the command name. The [alc] after
“touch” and “mtouch” indicates an optional allocation amount in bytes. The square braces in the descrip-
tion indicate the default value that will be used if the optional parameter is not given.
Figure 1. List of Shell Commands
You can type “h” and press enter at any time to display the FAT shell commands.
In the following examples the commands that you enter are shown in boldface type. The response from the
shell program is shown in regular typeface.