SafeRTOS

RTOS ››
Parent Previous Next

Introduction

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

tasks,

queues.


Requirements

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


Views

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

Figure 7: Plug-in selection


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


Figure 8: View selection


Tasks view

The SafeRTOS 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 SafeRTOS Task List view menu provides icons to open all additional views (queues).


Figure 9: Tasks list view example


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

Parameter name

Description

Name

The task name.

Priority

The task priority. The number of task priorities is defined inside SafeRTOSConfig.h. Lower number presents higher priority.

State

The task current state.

Start of Stack

The task stack start address.

Top of Stack

The task stack pointer address.


Queues view

The SafeRTOS 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 10: 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.


Proper configuration of SafeRTOS is necessary to enable access to queue related kernel data. If there are no queues displayed inside queue view window, then several items needs to be checked:

Each project includes configuration file called SafeRTOSConfig.h. Configuration option relevant to using SafeRTOS plug-in for queue kernel objects is configQUEUE_REGISTRY_SIZE. Macro configQUEUE_REGISTRY_SIZE defines the maximum number of queues that can be registered.

All queues that you want to view inside the queue view window needs to be registered. See the SafeRTOS 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 are available or RTOS is not configured correctly. An example of queue registration:


xQueueCreate(cQueue1Buffer,

portspecBLOCK_Q_BUFFER_LENGTH_1, portspecBLOCK_Q_QUEUE_LENGTH_1, portspecBLOCK_Q_QUEUE_ITEM_SIZE,
&(xQueueParameters1.xQueue);

vQueueAddToRegistry(xQueueParameters1.xQueue, "BlockQ #1");

There is a type definition required for proper evaluation of the queue parameters. See queue.c source file for following type definition:

typedef xQUEUE * xQueueHandle;


Semaphores (counting or binary) are implemented as queues, so all semaphores can be viewed inside the queue view window.





















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.