![]() |
CMSIS-FreeRTOS
Version 10.0.1
CMSIS-RTOS2 compliant FreeRTOS Implementation
|
You can basically choose between two option when creating a FreeRTOS project:
The steps to create a microcontroller application using FreeRTOS are:
In the Manage Run-Time Environment window, select ::Device:Startup, ::RTOS:CORE and ::RTOS:Config in the FreeRTOS variant and an applicable ::RTOS:Heap scheme (for more information on the heap schemes, visit the FreeRTOS documentation):
Click OK. In the Project window, you will see the files that have been automatically added to you project, such as FreeRTOSConfig.h, the source code files, as well as the system and startup files:
When you have created the native FreeRTOS project, you can configure the real-time operating system using the FreeRTOSConfig.h file. Please refer to the FreeRTOS documentation for more information on the specific settings.
#include
"EventRecorder.h"
main()
).Once the target application generates event information, it can be viewed in the µVision debugger using the Event Recorder.
The steps to create a microcontroller application using CMSIS-FreeRTOS are:
In the Manage Run-Time Environment window, select ::Device:Startup, ::CMSIS::RTOS2 (API)::FreeRTOS, ::RTOS:CORE in the FreeRTOS variant, ::RTOS:Config in the CMSIS RTOS2 variant, ::RTOS:Timers, ::RTOS:Event Groups, and an applicable ::RTOS:Heap scheme (for more information on the heap schemes, visit the FreeRTOS documentation):
Click OK. In the Project window, you will see the files that have been automatically added to you project, such as FreeRTOSConfig.h, the source code files, as well as the system and startup files:
When you have created the CMSIS-FreeRTOS project, you can configure the real-time operating system using the FreeRTOSConfig.h file. It can be opened using the Configuration Wizard view:
The following settings are available:
Name | #define | Description |
---|---|---|
Minimal stack size [words] | configMINIMAL_STACK_SIZE | Stack for idle task and default task stack in words. |
Total heap size [bytes] | configTOTAL_HEAP_SIZE | Heap memory size in bytes. |
Kernel tick frequency [Hz] | configTICK_RATE_HZ | Kernel tick rate in Hz. |
Timer task stack depth [words] | configTIMER_TASK_STACK_DEPTH | Stack for timer task in words. |
Timer task priority | configTIMER_TASK_PRIORITY | Timer task priority. |
Timer queue length | configTIMER_QUEUE_LENGTH | Timer command queue length. |
Use time slicing | configUSE_TIME_SLICING | Enable setting to use time slicing. |
Idle should yield | configIDLE_SHOULD_YIELD | Control Yield behavior of the idle task. |
Check for stack overflow | configCHECK_FOR_STACK_OVERFLOW | Enable or disable stack overflow checking. |
Use idle hook | configUSE_IDLE_HOOK | Enable callback function call on each idle task iteration. |
Use tick hook | configUSE_TICK_HOOK | Enable callback function call during each tick interrupt. |
Use daemon task startup hook | configUSE_DAEMON_TASK_STARTUP_HOOK | Enable callback function call when timer service starts. |
Use malloc failed hook | configUSE_MALLOC_FAILED_HOOK | Enable callback function call when out of dynamic memory. |
#include
"EventRecorder.h"
main()
).Once the target application generates event information, it can be viewed in the µVision debugger using the Event Recorder.