CMSIS-FreeRTOS  Version 9.0.0
CMSIS-RTOS2 compliant FreeRTOS Implementation
 All Functions Groups Pages
Create a FreeRTOS project

You can basically choose between two option when creating a FreeRTOS project:

  1. Create a native FreeRTOS project using the FreeRTOS API and kernel.
  2. Create a CMSIS-FreeRTOS project using the CMSIS-RTOS2 API with an underlying FreeRTOS kernel.

Create a native FreeRTOS project

The steps to create a microcontroller application using FreeRTOS are:

  • Create a new project and select a microcontroller device.
  • 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):

    manage_rte_freertos_native.png


  • If the Validation Output requires other components to be present, try to use the Resolve button.
  • 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:

    project_window_freertos_native.png
Todo:
Do we add user code templates for the native FreeRTOS implementation?
  • You can add template files to the project by right-clicking on Source Group 1 and selecting Add New Item to 'Source Group 1'. In the new window, click on User Code Template. On the right-hand side you will see all available template files for CMSIS-RTOS RTX:
Todo:
Do we offer an SCVD file for the native FreeRTOS implementation?

Add Event Recorder Visibility

  • To use the Event Recorder together with RTX5, select the software component Compiler:Event Recorder.
  • Select the Source variant of the software component CMSIS:RTOS2 (API):Keil RTX5.
  • Call the function EventRecorderInitialize() in your application code (ideally in main()).
  • Build the application code and download it to the debug hardware.

Once the target application generates event information, it can be viewed in the µVision debugger using the Event Recorder.

Create a CMSIS-FreeRTOS project

The steps to create a microcontroller application using CMSIS-FreeRTOS are:

  • Create a new project and select a microcontroller device.
  • 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:FreeRTOS:Timers, ::RTOS:FreeRTOS:Event Groups, and an applicable ::RTOS:Heap scheme (for more information on the heap schemes, visit the FreeRTOS documentation):

    manage_rte_freertos_rtos2.png


  • If the Validation Output requires other components to be present, try to use the Resolve button.
  • 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:

    project_window_freertos_rtos2.png
Todo:
Do we add user code templates for the RTOS2 FreeRTOS implementation?\
  • You can add template files to the project by right-clicking on Source Group 1 and selecting Add New Item to 'Source Group 1'. In the new window, click on User Code Template. On the right-hand side you will see all available template files for CMSIS-RTOS RTX:
Todo:
Do we offer an SCVD file for the RTOS2 FreeRTOS implementation?

Add Event Recorder Visibility

  • To use the Event Recorder together with RTX5, select the software component Compiler:Event Recorder.
  • Select the Source variant of the software component CMSIS:RTOS2 (API):Keil RTX5.
  • Call the function EventRecorderInitialize() in your application code (ideally in main()).
  • Build the application code and download it to the debug hardware.

Once the target application generates event information, it can be viewed in the µVision debugger using the Event Recorder.