Updated Apr 2025

RTOS Implementation

Introduction

This section describes part of the FreeRTOS implementation.

These pages will be helpful if you:

  • wish to modify the FreeRTOS source code.
  • port the real time kernel to another microcontroller or prototyping board.
  • are new to using an RTOS and wish to get more information on their operation and implementation.

The FreeRTOS real time kernel has been ported to a number of different microcontroller architectures. The Atmel AVR port was chosen for this example due to:

The section concludes with a detailed step by step look at one complete context switch.

Building Blocks

Detailed Example

The final part of section 2 shows how these building blocks and source code modules are used to achieve a context switch on the AVR microcontroller. The example demonstrates in seven steps the process of switching from a lower priority task, called TaskA, to a higher priority task, called TaskB.

The source code is compatible with the WinAVR development tools.