FreeRTOS with SystemView

From SEGGER - Support Wiki
Jump to: navigation, search

SystemView can be used to record applications which use FreeRTOS V8 or V9. To properly display execution of the FreeRTOS scheduler, the FreeRTOS source needs to be slightly modified. Follow these instructions to configure your system for recording with SystemView.

Supported Software

SystemView has been tested with FreeRTOS V8.2.3 and FreeRTOS V9.0.0. Newer versions should work accordingly.

Example Projects

These example packages include the modified FreeRTOS code as well as an example project, ready for use with SystemView. The example projects are created with Embedded Studio and can be used with almost any Cortex-M4 device. If you have trouble with your application and SystemView check for differences with the examples. If you need a starting point to create new applications, feel free to base them on the examples.

System Configuration

  1. Add the SYSVIEW and RTT core modules to the project
  2. Include SEGGER_SYSVIEW_Config_FReeRTOS.c in the project.
  3. At the end of FreeRTOSConfig.h or before every FreeRTOS.h add #include "SEGGER_SYSVIEW_FreeRTOS.h"
  4. In FreeRTOSConfig.h define INCLUDE_xTaskGetIdleTaskHandle as 1.
  5. In FreeRTOSConfig.h define INCLUDE_pxTaskGetStackStart as 1.
  6. Apply the patch file to the FreeRTOS kernel sources.
  7. Call SEGGER_SYSVIEW_Conf() in main after target initialization.