Kernel Configuration¶
The FreeRTOS kernel is configured by FreeRTOSConfig.h file which can be found
in {SDK_INSTALL_DIR}\kernel\freertos\builds\{DEVICE}\release\pregenerated_configuration
,
you can change the configuration file so that the kernel will be tailored to your application.
For more information about kernel configuration, please see FreeRTOS Kernel Configuration Overview.
In the SimpleLink Low Power F3 SDK, all FreeRTOS application routines are abstracted using the following:
A POSIX layer, which was designed for use with this SimpleLink Low Power F3 SDK
A Driver Porting Layer (DPL) for use by the TI Drivers
You can find example FreeRTOS projects that use the SimpleLink Low Power F3 SDK in the examples/rtos/
folder for all supported IDEs.
No native FreeRTOS examples are provided in this SimpleLink Low Power F3 SDK. If you want to use the native FreeRTOS routines without the abstractions provided by the SimpleLink Low Power F3 SDK, documentation is provided on the FreeRTOS website.
POSIX Support¶
Portable Operating System Interface (POSIX) is an IEEE industry API standard for OS compatibility. The SimpleLink Low Power F3 SDK provides support for POSIX APIs on top of FreeRTOS (as it does for TI-RTOS7). For a more detailed description of the POSIX support in the SimpleLink Low Power F3 SDK, please refer to the POSIX Overview Workshop
Driver Porting Layer (DPL)¶
The TI Drivers (e.g. UART2, I2C, Power Management, etc.) are written to be used with the Driver Porting Layer (DPL). The SimpleLink Low Power F3 SDK includes a DPL implementation for both FreeRTOS, TI-RTOS7 and no RTOS.
Using FreeRTOS with CCS¶
FreeRTOS is included within the SDK itself! Unlike past SDKs which required FreeRTOS to be defined manually in the linked resources.
In order to use FreeRTOS within CCS, you must specify the location of the FreeRTOS installation. To do this, follow these steps:
FreeRTOS vs. TI-RTOS7 modules¶
The application and the ICall layer communicate using events to call the OS and made context switch. The table below shows the modules that are used by TI-RTOS7 in a typical example flow, at the same time explains which modules are used by FreeRTOS.
Example flow |
TI-RTOS7 modules |
FreeRTOS modules |
1. Application Thread Listen (pend) on event number |
TI-RTOS7 Semaphore/Event |
SemaphoreP (used through DPL layer) and mq_send / mq_receive Blocking Mqueue (POSIX queues) |
2. Stack Thread Doing whatever he asked to do by the app called |
TI-RTOS7 Timers |
TimersP (used through DPL layer) |
3. Stack Thread Push a message (or number of messages) into the queue and post an event Queue |
TI-RTOS7 utility Queue |
mq_send / mq_receive NON-Blocking Mqueue (POSIX queues) |
4. Application Thread OS wakes the application thread and the application pulls the message from the Non-OS queue |
TI-RTOS7 utility Queue |
mq_send / mq_receive NON-Blocking Mqueue (POSIX queues) |
5. Application Thread Listen (pend) on event number - cycle has completed |
TI-RTOS7 event |
mq_send / mq_receive Blocking Mqueue (POSIX queues) |