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.
Create FreeRTOS Project
- Create a new Project in PSoC Creator.
- Download FreeRTOS_V10.0.0.zip, and unzip it into the project folder.
- 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:
- Add RTOS Library into the Project:
- Create Folders and add FreeRTOS files into your project:
FreeRTOS has two definitions for the port specific data type: TickType_t and BaseType_t in the portmacro.h header file.
|TickType_t||a data type used to hold the tick count value||configUSE_16_BIT_TICKS = 0 → TickType_t is defined as an unsigned 32-bit type;
configUSE_16_BIT_TICKS = 1 → TickType_t is defined as an unsigned 16-bit type;
|BaseType_t||generally used for return types that can take only a very limited range of values; and for pdTRUE/pdFALSE type Booleans||8-bit architecture → BaseType_t is defined as a 8-bit type;
16-bit architecture → BaseType_t is defined as a 16-bit type;
32-bit architecture → BaseType_t is defined as a 32-bit type;