Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.366

FreeRTOS

On this page:

Introduction

Requirements

Configuration steps

Tasks window

Queues window

Semaphores window

Timers window

 

 

Introduction

Debug support for FreeRTOS provides dedicated views for kernel objects and supports profiling.

Windows are available as separate windows via choose View | <window> | FreeRTOS.

 

Warning_orange

FreeRTOS is currently supported for Cortex and TriCore devices.

 

 

Profiling

Profiling of tasks is supported for FreeRTOS. There are two types of profiling available:

Running Task Profiling

oOnly information about whether the task is running or not.

oNo instrumentation or additional configuration is needed.

Task State Profiling

oInformation about which state the task is currently in (running, ready, suspended, etc.).

oInstrumentation and additional configuration are needed. Refer to the webinar OS-aware Debug & Trace with winIDEA and FreeRTOS

 

 

Requirements

To enable winIDEA to retrieve the information about the OS state, FreeRTOS must be properly configured using a configuration file called FreeRTOSConfig.h. This manual only describes the parts required for winIDEA OS awareness. Please refer to the FreeRTOS reference manual for full details.

 

 

Configuration steps

Follow the configuration steps for FreeRTOS Operating System. To get access to all supported kernel objects (Tasks, Queues, Semaphores and Timers), winIDEA OS awareness needs to be configured.

 

 

1. Define your OS in Debug | Configure Session | Applications | Edit.

Open or follow Session Configuration Wizard and select your OS.

 

2. Use a configuration file FreeRTOSConfig.h.

 

3. (optional) Specify a FreeRTOS Profiler XML file in Debug | Configure Session | Applications | Edit.

For information on the required contents of this file, refer to the webinar OS-aware Debug & Trace with winIDEA and FreeRTOS.

If task state profiling is not needed, leave this field blank.

 

 

Tasks window

The FreeRTOS Tasks window displays detailed information about all available tasks. You can enable automatic refresh to update the list each time the processor is stopped. Each row represents one task with multiple task parameters. The currently running task is highlighted.

 

RTOS-FreeRTOS-taskList

 

The functionality of each listed task parameter is described inside the following table:

Parameter name

Description

Name

Task base and actual priority. The base priority is the priority most recently assigned to the task. The actual priority is the priority that the task is currently running at, and may be temporarily elevated by the inheritance mechanism.

ID

Assigned task identification number. Appropriate RTOS configuration is required to access this kernel parameter. Specifically, the configUSE_TRACE_FACILITY macro needs to be set to 1, otherwise all IDs are 0. See the FreeRTOS configuration file (FreeRTOSConfig.h) for details.

Priority (Base/Actual)

Task base and actual priority. The task base priority is the priority last assigned to the task - used by the priority inheritance mechanism. The actual priority is the priority assigned to the task at task creation

State

The current state of the task.

Start of Stack

The lowest address of the memory block allocated for the stack.

Top of Stack

The current stack pointer.

Min. Free Stack

The amount of stack space that remained unused when the stack usage was at its highest. Also known as stack ‘high water mark’. The macro configRECORD_STACK_HIGH_ADDRESS (in FreeRTOSConfig.h) should be set to 1, otherwise this value may not be accurate as it will not be possible to calculate the total stack size. This macro is only supported by FreeRTOS 10.0.0 and later.

Stack Usage

The number of bytes currently used out of the total stack size. The macro configRECORD_STACK_HIGH_ADDRESS (in FreeRTOSConfig.h) must be set to 1 to display this. This macro is only supported by FreeRTOS 10.0.0 and later.

 

 

Queues window

The FreeRTOS Queues window displays detailed information about all available queues. You can enable automatic refresh to update the list each time the processor is stopped. Each row represents one queue with multiple queue parameters.

 

RTOS-FreeRTOS-queue

 

The functionality of each listed queue parameter is described inside the following table:

Parameter name

Description

Name

Queue name

Address

Queue address

Max. Length

Maximum number of items inside the queue

Item Size

Size of a queue item in bytes

Current Length

Number of items currently inside the queue

#Waiting TX

Number of blocked tasks waiting to send to the queue

#Waiting RX

Number of blocked tasks waiting to receive from the queue

 

FreeRTOS must be configured appropriately to enable access to queue-related kernel data. Each project includes a configuration file called FreeRTOSConfig.h. The configuration options relevant to using the FreeRTOS plugin for queue kernel objects are

configQUEUE_REGISTRY_SIZE - Defines the maximum number of queues that can be registered

configUSE_TRACE_FACILITY - set to 1 to display the queues' maximum length.

 

The queues that you want to see in the Queues window must be registered. See the FreeRTOS API reference documentation for vQueueAddToRegistry and vQueueUnregisterQueue for more information. The plugin will only display queues that have been added to the registry.

 

An example of queue registration:


xQueueHandle queueOne;
queueOne = xQueueCreate(QUEUE_LENGTH, sizeof(unsigned portLONG));
vQueueAddToRegistry(queueOne, (portCHAR*)"queueOne");

 

 

Semaphores window

The FreeRTOS Semaphores window displays detailed information about all available synchronization objects: mutexes and semaphores (counting, binary, and recursive). You can enable automatic refresh to update the list each time the processor is stopped. Each row represents one synchronization object.

 

RTOS-FreeRTOS-semaphore

 

 

The functionality of each listed synchronization object parameter is described inside the following table:

 

Parameter name

Description

Name

Synchronization object name

Address

Synchronization object address

Type

Synchronization object type

Size

The maximum count of the semaphore. Equal to the length of the underlying queue

# Blocked Tasks

The number of blocked tasks waiting for the synchronization object

 

FreeRTOS must be configured appropriately to enable access to semaphore-related kernel data and each semaphore must be registered for winIDEA to be able to display it. As semaphores are internally implemented using queues, this configuration and registration is the same as for queues.

 

An example of semaphore registration:


xSemaphoreHandle semaphoreMutex;
semaphoreMutex = xSemaphoreCreateMutex();
vQueueAddToRegistry(semaphoreMutex, (portCHAR*)"semaphoreMutex");

 

 

Timers window

The FreeRTOS Timers window displays detailed information about all available timers. You can enable automatic refresh to update the list each time the processor is stopped. Each row represents one timer with multiple parameters.

 

RTOS-FreeRTOS-timer

 

The functionality of each listed timer parameter is described inside the following table:

 

Parameter name

Description

Name

Timer name

Period

Timer period in ticks

Type

Timer type: auto-reload is reactivated after expiration; one-shot is not reactivated after expiration

Id

Timer identifier

Callback (name/address)

Timer callback function name and address

 

 

More resources

OS-aware Debug & Trace with winIDEA and FreeRTOS - Webinar

Tasks Window

 

 

Copyright © 2025 TASKING