IntroductionThe RTOS source code download includes a demonstration project for each port. The sample projects are preconfigured to execute on the single board computer or prototyping board used during the port development. Each should build directly as downloaded without any warnings or errors.The demonstration projects are provided as:
Locating a demo applicationEvery demo application is located in a subdirectory off the FreeRTOS/Demo directory. The name of each such subdirectory describes the configuration of the demo application it contains. Please see the FreeRTOS source code organization page for a full explanation of the FreeRTOS directory structure.
Demo specific documentationThis website contains a documentation page for each demo application included in the FreeRTOS download. These pages contain valuable and time saving information, such as how to setup the hardware and how to build the demo. To locate the documentation page for any particular demo first expand the "Supported Devices" menu (see image below) to reveal a list of microcontroller vendors that are supported by FreeRTOS. Clicking a vendor name will take you to a list of documentation pages specific to that vendor. |
![]() Port documentation pages are grouped by device manufacturer. Expand the list of supported devices, then click the manufacturer of interest to be taken to a list of demo documentation pages. |
Most demos applications also create a 'check' task in one form or another. The 'check' task will execute infrequently (typically every 3 or 5 seconds) but has a high priority so is guaranteed to get processor time. Its primary responsibility is to check that all the other tasks are still operating as expected, and that no errors have been detected. The check task will report the system status either on an LCD (if present) or by toggling an LED.
A typical main() function will have the following structure:
int main( void )
{
/* Setup the microcontroller hardware for the demo. */
prvSetupHardware();
/* Create the common demo application tasks, for example: */
vCreateFlashTasks();
vCreatePollQTasks();
vCreateComTestTasks();
Etc.
/* Create any tasks defined within main.c itself, or otherwise specific to the
demo being built. */
xTaskCreate( vCheckTask, "check", STACK_SIZE, NULL, TASK_PRIORITY, NULL );
Etc.
Start the scheduler, this function should not return as it causes the execution
context to change from main() to one of the created tasks. */
vTaskStartScheduler();
/* Should never get here! */
return 0;
}
[These lists are currently a little historic as they have not been maintained completely as the number of demo files has increased over the years. Even so they still provide a good reference. Demo project files that have been added more recently tend to have been designed more specifically for testing than just for demonstration.]
Two implementations are provided for many files listed below. The files contained in the Demo/Common/Minimal directory are for more RAM challenged systems such as the AVR. These files do not contain console IO. The files contained in the Demo/Common/Full directory are predominantly for the x86 demo projects and contain console IO. Other than that the functionality of the two implementations are basically the same. See the Source Code Organization section for more information on the demo project directory structure.
A few of points to note:
| File | Features Demonstrated |
| main.c |
|
| dynamic.c |
|
| BlockQ.c |
|
| ComTest.c |
|
| CRFlash.c |
|
| CRHook.c |
|
| Death.c |
|
| Flash.c |
|
| Flop.c |
|
| Integer.c |
|
| PollQ.c |
|
| Print.c |
|
| Semtest.c |
|