 | RL-ARM User's Guide |  |
|
|
| File_ex1The File_ex1 example program shows the use of the Flash File System to store, retrieve, and manage files on a RAM Device. The example is located in the folder \Keil\ARM\RL\FlashFS\Examples\File_ex1. Follow these steps to test the application: - Open the project File_ex1.uvproj.
- Build the application and run it with the µVision Debugger.
- Open the serial window UART #2 and enter the file commands:
| Command | Description |
|---|
| N name | Creates or sets the file name for all file operations. By default, this name is used for other commands. | | C | Captures the text entered from a serial window to a file. Uses the file name set by the N command. CAPTURE.TXT is the default file name. | | A | Appends the text entered from a serial window to the end of file. | | R | Reads a file content and output it to a serial window. | | E new | Renames a file to a new file name. The file name set by the N command is renamed. | | D | Deletes a file. | | L | Lists the directory files. |
- Enter the command C to capture the output.
Command: C
Now, any text entered in the serial window is written to the default file CAPTURE.TXT. - The default capturing file can be changed using the command N, for example N INDEX.TXT, before starting capturing.
Command: N INDEX.TXT
Command: C
Any text entered is written to the file INDEX.TXT. Press ESC to end the capturing process. - Use the L command to display the list of all files.
Command: L
The files appear as in the following example: 
|
|