FreeRTOS-Plus-FAT Examples
The FreeRTOS-Plus-FAT examples described below are included in the 'comprehensive' demo project that is
described on the FreeRTOS-Plus-TCP pages.
The demo project can be built and executed using free development tools and in
a Windows environment.
Examples:
The
main.c
source file includes a function called
prvCreateDiskAndExampleFiles(),
which calls
FF_RAMDiskInit().
FF_RAMDiskInit() is the
initialisation function
for FreeRTOS-Plus-FAT's RAM disk media driver. It demonstrates how to
partition
a disk, format
a partition, mount
the formatted partition, and
add the mounted partition
to the FreeRTOS-Plus-FAT virtual file system. The mounted partition appears
as /ram.
prvCreateDiskAndExampleFiles() also calls
vCreateAndVerifyExampleFiles()
which demonstrates the use of
ff_fread(),
ff_fwrite(),
ff_fgetc() and
ff_fputc().
The files and directories created by prvCreateDiskAndExampleFiles()
can be viewed and manipulated using both the FTP server example
and the UDP command line interface (information on both of these below).
The UDP
command line interface example
includes commands that allow files to be viewed, accessed and manipulated, as described in the
following table:
Command
|
Description
|
dir
|
View a directory listing
|
cd <path>
|
Change the current working directory (CWD) to <path>
|
del <file>
|
Delete <file>
|
rmdir <path>
|
Remove the directory <path> - the directory must be empty
|
type <file>
|
Display the contents of <file>.
|
copy <src> <dest>
|
Copy the file <src> to the file <dest>
|
pwd
|
Print the working directory
|
Accessing the file system through the command line interface
Both the
FTP example
and the
HTTP example
use FreeRTOS-Plus-FAT as the file
system.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.