Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Updated Mar 2025

HTTP Web Server Example

FreeRTOS-Plus-TCP and FreeRTOS-Plus-FAT Examples

Note: This demo has a dependency on the FreeRTOS-Plus-FAT code base and is therefore currently only available in the FreeRTOS Labs download.

Not all demo projects will include this example. If this example is included in a demo project then it may be necessary to set mainCREATE_HTTP_SERVER to 1 at the top of the project's main.c source file to include the example in the build.

This example uses FreeRTOS-Plus-TCP to implement a basic web (HTTP) server that accesses files from a file system implemented by FreeRTOS-Plus-FAT. Some demo projects store files on a RAM disk, while others store files on non-volatile media such as an SD card.

The base directory used by the web server is set by the configHTTP_ROOT constant in FreeRTOSConfig.h. If a RAM disk is used then a default and very basic HTML file called "freertos.html" is created in the base directory after it is mounted. The FTP server can be used to overwrite the default HTML file with different web content.

NOTE: Performance will be limited when using the FreeRTOS Windows port.

Viewing the default web page served by the FreeRTOS-Plus-TCP web server (Click to enlarge)