 | RL-ARM User's Guide |  |
|
|
| SD_FileThe SD_File example program shows the use of the Flash File System to store, retrieve, and manage files on a Secure Data Card drive. Example are located in the folders \ARM\Boards\vendor\board\RL\FlashFS. - Open the SD_File.uvproj project.
- Build the project.
- Connect ULINK to the PC and to the target board.
- Power-up the target board.
- Download the example to the target board.
- Test the following file commands from a serial window:
| Command | Description |
|---|
| CAP "fname" [/A] | Captures serial data and stores it in the file fname. /A - the option appends data to a file. | | COPY "fin" ["fin2"] "fout" | Copy of the file fin to the file fout. The fin2 option merges the file fin and fin2 into the file fout. | | DEL "fname" | Deletes the file fname. | | DIR ["mask"] | Displays the list of files and folders. | | FILL "fname" [nnnn] | Creates a file fname and fills it with text. nnnn - the option specifies the number of lines containing the fill-text (default is 1000). | | FORMAT [labName] [/FAT32] | Formats the media and gives it a label labName. The option /FAT32 enforces formatting the media as FAT32. | | REN "fname1" "fname2" | Renames the file fname1 file to fname2. | | TYPE "fname" | Displays the content of the file fname. |
Examples of using the commands. - FORMAT KEIL
Formats the media and gives it the label KEIL. - FILL "M:\Test folder\Test file.txt"
Creates a long file name Test file.txt in the folder Test folder and filles the file with text. - DIR "M:\Test folder\*.*"
Displays all the files of the folder Test folder. - TYPE "M:\Test folder\Test file.txt"
Displays the content of the file Test file.txt. - REN "M:\Test folder\Test file.txt" "Test file renamed.txt"
Renames the file Test file.txt located in the folder Test folder to Test file renamed.txt file in the same folder. - COPY "M:\Test folder\Test file renamed.txt" "M:\test.txt"
Copies the file Test file renamed.txt located in the folder Test folder to the file TEST.TXT of the root folder. - DEL "M:\Test folder\Test file renamed.txt"
Deletes the file Test file renamed.txt from the folder Test folder. - DEL "M:\Test folder\"
Deletes the folder Test folder. - DIR "M:\*.*"
Displays all file names located in the root folder. - TYPE "M:\test.txt"
Displays the content of the file TEST.TXT which is located in the root folder.
|
|