FreeRTOS

FreeRTOS

This page provides general guidance for using the FreeRTOS real-time operating system with Xilinx devices. 

Table of Contents

Introduction 

Developed in partnership with the world’s leading chip companies over a 15-year period, FreeRTOS is a market-leading real-time operating system (RTOS) for microcontrollers and small microprocessors. Distributed freely under the MIT open source license, FreeRTOS includes a kernel and a growing set of libraries suitable for use across all industry sectors. FreeRTOS is built with an emphasis on reliability and ease of use.

The FreeRTOS kernel was originally developed by Richard Barry around 2003, and was later developed and maintained by Richard's company, Real Time Engineers Ltd. FreeRTOS was a runaway success, and in 2017 Real Time Engineers Ltd. passed stewardship of the FreeRTOS project to Amazon Web Services (AWS). Richard continues to work on FreeRTOS as part of an AWS team. 

Please refer https://www.freertos.org/RTOS.html for further information.

FreeRTOS Support for Xilinx Devices

FreeRTOS kernel port is available for following Xilinx processors:

  • 64-bit Cortex-A53 Application processor (APU) & 32-bit Cortex-R5 Real-time processor (RPU)

    • ZynqUS+ SoC devices

  • 64-bit Cortex-A72 Application processor (APU) & 32-bit Cortex-R5 Real-time processor (RPU)

    • Versal SoC devices

  • 32-bit Cortex-A9 Application processor (APU)

    • Zynq-7000 SoC devices 

  • 32-bit MicroBlaze processor

    • All Xilinx device families


Xilinx FreeRTOS source code: FreeRTOS port for Xilinx HW can be found at https://github.com/Xilinx/embeddedsw/tree/master/ThirdParty/bsp

FreeRTOS in the Xilinx Ecosystem

Xilinx FreeRTOS BSP comprises of FreeRTOS kernel, Xilinx libraries, Xilinx peripheral drivers  and Xilinx standalone library. Each of these components are explained in subsequent sections,

FreeRTOS Kernel

The FreeRTOS kernel consist of FreeRTOS core kernel + porting layer. For 2021.x releases,  FreeRTOS kernel 10.4.3 is being used

  •  

    • FreeRTOS core kernel: Xilinx uses core kernel source as-is from https://sourceforge.net/projects/freertos/files/FreeRTOS

    • Porting layer: Source code for porting  FreeRTOS to various Xilinx HW can be found at  embeddedsw/ThirdParty/bsp/freertos<FreeRTOS major version>_xilinx/src/Source/portable/GCC 

Xilinx Libraries 

Xilinx provides various OS independent libraries and 3rd party libraries (e.g. lwip). These libraries can be seamlessly used in Xilinx FreeRTOS environment.

Note about FreeRTOS+:  The FreeRTOS website supports an ecosystem of add-on products/components that are referred to as FreeRTOS+.  This ecosystem is separate from, and unrelated to, the Xilinx ecosystem support described on this page.  So, for example, the FreeRTOS+TCP product should not be confused with the Xilinx ecosystem solution that leverages FreeRTOS and lwip.  Additionally, several examples of FreeRTOS+ products running on Xilinx devices exist and these should not be interpreted as examples of how Xilinx supports FreeRTOS but, rather, examples of community driven contributions.

Xilinx peripheral drivers 

All Xilinx provided drivers are OS agnostic, they can be used with Xilinx FreeRTOS ecosystem

Xilinx Standalone library

Standalone library consist of boot code, vectors, basic IO APIs, light weight print functions, MMU/MPU APIs. and cache APIs Driver deals with the hardware through direct hardware interface implemented in standalone Library. Direct hardware interface is typically implemented as macros and constants, and it is designed such that developer can create a small applications or create a custom device driver using it. FreeRTOS kernel uses few of the APIs available in Xilinx standalone library

HW Platform requirement to run FreeRTOS

FreeRTOS requires tick timer to schedule the tasks. In order to run FreeRTOS on specific processor, the HW platform must have valid timer peripheral connected to the interrupt controller. Timer peripherals which can be used as tick timer in Xilinx ecosystem are as given below:

  • Zynq UltraScale+: Cortex-A53 64 bit processor - Triple Counter Counter (TTC)  IP
                            Cortex-R5 32 bit processor - TTC IP

  • Versal : Cortex-A72 64 bit processor - Triple Counter Counter (TTC)  IP
                            Cortex-R5 32 bit processor - TTC IP

  • Zynq-7000: Cortex-A9 32 bit processor - TTC IP

  • MicroBlaze Processor :  AXI Timer or  TTC IP from PS block interrupting to the MicroBlaze (via AXI interrupt controller)

FreeRTOS Application Creation and Customization

This section describes procedures to create FreeRTOS template applications and customization of kernel configuration using the Vitis Unified Software Platform. 

FreeRTOS Application creation

The following steps describe the procedure to create FreeRTOS hello world application. 

  1. Select "New->Application Project" from the Vitis "File" menu. The New Project dialogue box will appear.



  2. Click Next button, In the New Project dialogue box, select the hardware platform as appropriate.





  3.  Click "Next" button

  4. Select intended processor i.e. "psu_cortexa53_0","psu_cortexr5_0","ps7_cortexa9_0","microblaze_0"  as the processor.

  5. Click "Next" button

  6. Select available FreeRTOS version as Operating system

  7. Click "Next" button

  8. Now application template dialogue box would appear on the screen.Select the FreeRTOS Hello World template, and click "Finish". 




  9. Vitis would create hw_platform, FreeRTOS BSP and application project. FreeRTOS kernel and other peripheral drivers for IP's in HW platform would be included in BSP project.



© 2025 Advanced Micro Devices, Inc. Privacy Policy