 | RL-ARM User's Guide |  |
|
|
| MSD_FileThe MSD_File example application shows the use the Flash File System to store, retrieve, and manage files on a USB Mass Storage Device. Examples are located in the folder \ARM\Boards\vendor\board\RL\USB\Host. - Load the project MSD_File.uvproj.
- Build the project.
- Power-up and connect the target board.
- Download application to 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 give it a label KEIL. - FILL "U:\Test folder\Test file.txt"
Creates a long file name Test file.txt in the folder Test folder and fills it with text. - DIR "U:\Test folder\*.*"
Displays all the files of the folder Test folder. - TYPE "U:\Test folder\Test file.txt"
Displays the content of the file Test file.txt located in the folder Test folder. - REN "U:\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. - COPY "U:\Test folder\Test file renamed.txt" "U:\test.txt"
Copies the file Test file renamed.txt located in the folder Test folder to the file test.txt located in the root folder. - DEL "U:\Test folder\Test file renamed.txt"
Deletes the file Test file renamed.txt. - DEL "U:\Test folder\"
Delete the folder Test folder. - DIR "U:\*.*"
Displays all the files of the root folder. - TYPE "U:\test.txt"
Displays the content of the file test.txt.
|
|