Download FreeRTOS
 

Quality RTOS & Embedded Software

LIBRARIES
WHAT'S NEW
Simplifying Authenticated Cloud Connectivity for Any Device.
Designing an energy efficient and cloud-connected IoT solution with CoAP.
Introducing FreeRTOS Kernel version 11.0.0:
FreeRTOS Roadmap and Code Contribution process.
OPC-UA over TSN with FreeRTOS.

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:




Creating a Disk

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.


Creating, Writing and Reading Files

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).


File Related CLI Commands

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 embedded FAT file system through the command line interface
Accessing the file system through the command line interface


FTP and HTTP Servers

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.