Lesson 11: 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 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 provide under lincense 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 safty related standards.


Thre FreeRTOS is based on open source license. It can be used in commercial applications, and 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 following directories into Additional Include Directories item:
      .\FreeRTOS; .\FreeRTOS\include; .\FreeRTOS\portable\GCC\ARM_CM3; .\FreeRTOS\portable\MemMang
      addFreeRTOSpath s
  4. Create Folders and add FreeRTOS files into 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 following folders under FreeRTOS folder
      addSubFolders FreeRTOS
    • Right click on the RTOS folder that just created, and select Add ➤ Existing Item. Add following files into the folders as shown as blows:
      addNewFiles FreeRTOS

Application Code