FreeRTOS

RTOS ››
Parent Previous Next

Introduction

This document provides information about kernel objects for FreeRTOS real-time operating system, available in the winIDEA. Debug support provides generic profiler and tasks capabilities and several dedicated views for various kernel objects:

tasks,

queues,

semaphores,

timers.


Requirements

In order to locate some kernel data structures it is necessary to appropriate configure FreeRTOS, using a configuration file called FreeRTOSConfig.h. This document provides all necessary information to successfully enable FreeRTOS Semaphores and FreeRTOS Queues kernel data structures access. Please refer to FreeRTOS reference manual for more details about RTOS configuration.


Views

Debug support for FreeRTOS is implemented as winIDEA plug-in. To get access to all supported kernel objects as separate views (tasks, queues, semaphores and timers), appropriate plug-in needs to be loaded. Select Plugins/Options… top level menu item and load freeRTOS RTOS plug-in from the available list. See figure 1 for details.

Figure 1: Plug-in selection


Tasks, queues, semaphores and timers kernel objects are available as separate views, loaded on demand from Plugins/freeRTOS RTOS top level menu item. See figure 2 for details.


Figure 2: View selection


Tasks view

The FreeRTOS Task List view displays detailed information about all available tasks parameters. The list is updated each time the processor is stopped.

Figure 3 depicts an example of tasks snapshot. Each row represents one task with multiple task parameters. Currently running task is highlighted.

The FreeRTOS Task List view menu provides icons to open all additional views (semaphores, queues, timers).


Figure 3: Tasks list view example


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

Parameter name

Description

Name

The task name.

ID

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

Priority (Base/Actual)

The 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 task current state.

Start of Stack

The task stack start address.

Top of Stack

The task stack pointer address.

Event Object

The name of the resource that puts task into the blocked state

Min. Free Stack

The task minimum free stack is the amount of stack that remained unused when the task stack was at its greatest value. Also known as stack ‘high water mark’.


Queues view

The FreeRTOS Queue Objects List view displays detailed information about all available queue parameters. The list is updated each time the processor is stopped.

Figure 4 depicts an example of queue snapshot. Each row represents one queue with multiple queue parameters.


Figure 4: Queue objects list view example


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

Parameter name

Description

Name

The queue name.

Address

The queue address.

Max. Length

Maximum number of items inside queue.

Item Size

The queue item size in bytes.

Current Length

Number of items currently inside queue.

#Waiting TX

The blocked tasks number waiting to send to the queue.

#Waiting RX

The blocked tasks number waiting to receive from the queue.


It is requested to appropriate configure FreeRTOS to enable access to queue related kernel data. Each project includes configuration file called FreeRTOSConfig.h. Configuration options relevant to using FreeRTOS plug-in for queue kernel objects are: configQUEUE_REGISTRY_SIZE and configUSE_TRACE_FACILITY. Macro configQUEUE_REGISTRY_SIZE (see FreeRTOSConfig.h) defines the maximum number of queues that can be registered. Macro configUSE_TRACE_FACILITY see (FreeRTOSConfig.h) needs to be set to 1 to display queues maximum length.

All queues that you want to view inside queue list view, needs to be registered. See the FreeRTOS API reference documentation for vQueueAddToRegistry() and vQueueUnregisterQueue() for more information. The plug-in will only display queues that have been added to the registry. An empty queue view is shown if no queues available or RTOS misconfigured. An example of queue registration:


 xQueueHandle queueOne;

 queueOne = xQueueCreate(QUEUE_LENGTH, sizeof(unsigned portLONG));

 vQueueAddToRegistry(queueOne, (portCHAR*)"queueOne");


Semaphores view

The FreeRTOS Semaphore Objects List view displays detailed information about all available synchronization objects: mutexes and counting, binary and recursive semaphore. The list is updated each time the processor is stopped.

Figure 5 depicts an example of semaphores snapshot. Each row represents one synchronization object.


Figure 5: Semaphore objects list view example


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

Parameter name

Description

Name

The synchronization object name.

Address

The synchronization object address.

Type

The synchronization object type.

Size

The number of owning tasks.

# Blocked Tasks

The blocked tasks number waiting for the synchronization object.


It is requested to appropriate configure FreeRTOS to enable access to synchronization object related kernel data. Each project includes configuration file called FreeRTOSConfig.h. Configuration options relevant to using FreeRTOS plug-in for semaphore kernel objects are: configQUEUE_REGISTRY_SIZE and configUSE_TRACE_FACILITY. Macro configQUEUE_REGISTRY_SIZE (see FreeRTOSConfig.h) defines the maximum number of synchronization objects that can be registered. Macro configUSE_TRACE_FACILITY see (FreeRTOSConfig.h) needs to be set to 1 to display semaphore type and length.

All semaphores that you want to view inside queue list view, needs to be registered. See the FreeRTOS API reference documentation for vQueueAddToRegistry() and vQueueUnregisterQueue() for more information. The plug-in will only display semaphores that have been added to the registry. An empty semaphore view is shown if no semaphores available or RTOS misconfigured. An example of semaphore registration:

xSemaphoreHandle semaphoreMutex;

semaphoreMutex = xSemaphoreCreateMutex();

vQueueAddToRegistry(semaphoreMutex, (portCHAR*)"semaphoreMutex");


Timers view

The FreeRTOS Timer Objects List view displays detailed information about all available timers parameters. The list is updated each time the processor is stopped.

Figure 6 depicts an example of timers snapshot. Each row represents one timer with multiple parameters.


Figure 6: Timer objects list view example











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

Parameter name

Description

Name

The timer name.

Period

The timer period in ticks.

Type

The timer type: auto-reload is reactivated after expiration; one-shot is not reactivated after expiration.

Id

The timer identifier.

Callback (name/address)

The timer callback function name and address.


Tasks profiling

WinIDEA enables FreeRTOS tasks profiling. Please see Profiler Use Cases help topic, RTOS Profiling chapter, describing profiler configuration.


Generic Tasks window

WinIDEA also provides generic Task window showing current tasks, registers and some other RTOS specific kernel parameters. Please see winIDEA help, section RTOS-Tasks window, describing all available tasks parameters.



Disclaimer: iSYSTEM assumes no responsibility for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time without notice, and does not make any commitment to update the information herein.

α iSYSTEM . All rights reserved.