Example FreeRTOS-Plus-FAT SL Project
For the FreeRTOS Win32 Simulator (and other hardware platforms)
FreeRTOS-Plus-FAT is also demonstrated using the same functionality as
described on this page in the following RTOS demo applications:
The project described on this page is located in the following folder of
the main FreeRTOS .zip file download
The project creates a RAM disk using the
FreeRTOS Windows simulator
The Windows simulator provides a convenient evaluation platform, but it
does not exhibit real time behaviour. Simulated time is much slower than
The project is pre-configured to build with the
free Express edition of Microsoft Visual C++
(MSVC). MSVC Express Edition 2010 was used.
Creates and formats
a RAM disk using the standard
media driver API.
to create a set of example files in the root directory of the RAM disk.
to read the files that were created in the root directory.
to create two sub directories, and
move into the created subdirectory.
to create a file one character at a time.
to read back a file one character at a time.
Create a command console (using
that implements the following file system related commands:
Command and parameters
Lists the name, size and attributes of the files in the
current working directory.
cd [dir name]
Sets the current working directory to [dir name]
Prints the contents of [filename] to the command console window
copy [source file] [destination file]
Creates a duplicate of [source file] named [destination file]
The command console is accessed from a UDP terminal.
See the Usage Instructions
The demo application is available in the main
FreeRTOS .zip file download.
Open the Visual Studio solution file FreeRTOS_Plus_FAT_SL_with_CLI.sln
from within the Visual Studio IDE. The solution file is located
in the "FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator"
Select "Build Solution" from the IDE's Build menu (or press F7)
to build the application.
The standard Visual Studio
key used to start a debug session and break on entry to main() is F10.
The same host computer is used to build the application, debug the application,
and (because the FreeRTOS Win32 simulator is used) run the application.
There are no special debugging instructions.
The demo application creates a set of files and directories on
a RAM disk. Information messages generated during this process
are output to the Windows console. This allows this portion of
the demo application to be used without a command console.
The output generated in the Windows console when the demo application starts
This demo connects to the FreeRTOS-Plus-CLI command line interface though a UDP port.
The Windows TCP/IP stack is used instead of FreeRTOS-Plus-UDP to ensure
this demo remains focused on the file system. A demo application
that uses the FreeRTOS Windows simulator and FreeRTOS-Plus-UDP to create
a command console is available in the FreeRTOS-Plus-UDP
section of this website.
Free dumb terminal programs that are suitable for connecting to
the command line interface using UDP include
The standard localhost IP address (127.0.0.1) can be used because
both the (simulated) demo application and the UDP terminal execute
on the same computer. FreeRTOS-Plus-CLI listens for characters
arriving on UDP port 5001 and sends its output to UDP port 5002.
The required terminal configuration is shown below.
Configuring the YAT terminal to communication with the
FreeRTOS-Plus-CLI command line interface
As always with FreeRTOS-Plus-CLI, type "help" to see a list of
Type "help" in the UDP terminal to see a list of registered commands
Experiment with the file system commands! A sample session is shown below.
Running FreeRTOS file system commands in the YAT terminal
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.