SafeRTOS
On this page:
•Task
This chapter 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:
In order to locate the kernel data structures it is necessary to configure SafeRTOS using a configuration file called SafeRTOSConfig.h. Please refer to SafeRTOS reference manual for more details about RTOS configuration.
Tasks and queues objects are available as separate views. To load it open View | <name> safeRTOS RTOS.:
To get access to all supported kernel objects as separate views (tasks, queues), winIDEA OS awareness needs to be configured. Follow the Session Configuration Wizard and configure OS.
The SafeRTOS Task List view displays detailed information about all available tasks parameters. You can enable automatic refresh to update the list each time the processor is stopped. Image below 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).
The functionality of each listed task parameter is described inside the following table:
Parameter name |
Description |
---|---|
Name |
The task name. |
Core |
The core index. |
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 current priority of the task and may be inherited. |
State |
The task current state. |
Start of Stack |
The task stack start address. |
Top of Stack |
The task stack pointer address. |
The SafeRTOS Queue Objects List view displays detailed information about all available queue parameters. You can enable automatic refresh to update the list each time the processor is stopped.
The image below depicts an example of a queue snapshot. Each row represents one queue with multiple queue parameters.
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 the queue. |
Item Size |
The queue item size in bytes. |
Current Length |
Number of items currently inside the 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, |
•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.