Lesson 14: Real-Time OS FreeRTOS

About FreeRTOS Operation System

FreeRTOS is a real-time operating system kernel for embedded devices. It is a free RTOS, a portable, open source, and a mini Real Time kernel for microcontrollers. You can check http://www.FreeRTOS.org regularly for detailed information.

FreeRTOS has the following editions:


FreeRTOS has the following standard features:

  • Preemptive or co-operative operation
  • Very flexible task priority assignment
  • Queues, binary semaphores, counting semaphores, mutexes, recursive mutexes
  • Software timers, event groups
  • Tick and Idle hook functions
  • Stack overflow checking


OpenRTOS is a commercially licensed version of FreeRTOS provided under license from Real Time Engineers Ltd. by a third party.


SafeRTOS shares the same usage model as FreeRTOS but has been developed in accordance with the practices, procedures, and processes necessary to claim compliance with various internationally recognized safety-related standards.


The FreeRTOS is based on an open-source license. It can be used in commercial applications and is freely available to everybody. FreeRTOS users retain ownership of their intellectual property.

See http://www.FreeRTOS.org/license for the latest open source license information.

Data Types

Create FreeRTOS Project

  1. Create a new Project in PSoC Creator.
  2. Download FreeRTOS_10.0.0_PSoC56.zip, and unzip it into the project folder.
  3. Add FreeRTOS paths into the Project
    • From the Project menu, select Build Setting...
    • Expand the tree under ARM GCC XXXX, and click Compiler
    • Add the following directories into the Additional Include Directories item:
      .\FreeRTOS; .\FreeRTOS\include; .\FreeRTOS\portable\GCC\ARM_CM3; .\FreeRTOS\portable\MemMang
      addFreeRTOSpath s
  4. Create Folders and add FreeRTOS files to your project
    • Right-click on the Project in the Workspace Explorer window, then type FreeRTOS as the folder name.
      addNewFolder FreeRTOS
    • Select Add ➤ New Folder. Add the following folders under the FreeRTOS folder
      addSubFolders FreeRTOS
    • Right-click on the RTOS folder just created, and select Add ➤ Existing Item. Add the following files into the folders as shown as blows:
      addNewFiles FreeRTOS

Application Code