MQX

RTOS ››
Parent Previous Next

Introduction

This document provides information about kernel objects for MQX 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,

LightWeight Semaphores,

LightWeight Timers,

Timers,

Memory Pools,

MSG Pools,

MSG Queues,

MSGs,

Mutexes,

Task Queues.


Views

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

Figure 11: Plug-in selection


Kernel objects are available as separate views, loaded on demand from Plugins/MQX RTOS top level menu item. MQX data is updated each time the processor is stopped.  See figure 2 for details.


Figure 12: View selection



















Tasks view

The MQX Task List view displays detailed information about all available tasks parameters.

Figure 3 depicts an example of tasks snapshot. Each row represents one task with multiple task parameters. Currently running task is highlighted. Double click on entry will show location of the function.

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


Figure 13: 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.

Entry

Pointer to the root function for the task. When MQX creates the

task, the task begins running at this address.

Stack usage

Indicates how much task stack is used.

Stack size

Size of the task stack.

Priority

Software priority of the task

Attribute

Attributes of tasks that MQX creates from the template

Creation Parameter

Passed to tasks that MQX creates from the template

Default time slice

If the task uses round robin scheduling and the field is non-zero,

MQX uses the value as the task’s time slice value. If the task uses

round robin scheduling and the field is 0, MQX uses the default

time slice value.

State

State of the task (ready or blocked)

Error

Task error

LightWeight Semaphore view

The MQX LightWeight Semaphore view displays detailed information about all available lightweight semaphores.

Figure 4 depicts an example of lwSemaphore snapshot. Each row with the same color, represents one lwSemaphore with multiple parameters.


Figure 14: lwSemaphore view example


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

Parameter name

Description

Name

Pointer to the lightweight semaphore.

Valid

Is lightweight semaphore component valid.

Value

Value of lwSemaphore.

Waiting

Number of the waiting tasks.

Waiting tasks

Task that are waiting on the lwSemaphore.














Mutex view

The MQX Mutex List view displays detailed information about all available tasks parameters.

Figure 5 depicts an example of mutex snapshot. Each row with the same color, represents one mutex with multiple parameters.

Figure 15: Mutex list view example


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

Parameter name

Description

Mutex

Pointer to mutex structure

Valid

Is mutex component valid.

Wait protocol

Waiting protocol

Scheduling protocol

Scheduling protocol

Priority

Priority of the mutex. If the scheduling protocol is priority protect,

MQX grants the mutex only to tasks with at least this priority.

Count

Maximum number of spins. The field is used only if the waiting

protocol is limited spin.

Lock

Is mutex locked.

Owner

Pointer to the root function for the task that has locked the mutex.

Waiting tasks

Queue of tasks that are waiting to lock the mutex. If

PRIORITY_INHERITANCE is set, the queue is in priority order;

otherwise, it is in FIFO order.








Queue view

The MQX Queue List view displays detailed information about all available queue parameters.

Figure 6 depicts an example of queue snapshot. Each row with the same color, represents one queue with multiple parameters.


Figure 16: Queue objects list view example


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

Parameter name

Description

Queue

Pointer to the task queue structure.

Valid

Is queue component valid.

Policy

Queuing policy.

Tasks in queue

List of tasks that are in the queue.
















LightWeight Timer view

The MQX LightWeight Timer List view displays detailed information about all available lwTimer parameters.

Figure 7 depicts an example of lwTimer snapshot. Each row with the same color, represents one lwTimer with multiple parameters.


Figure 7: lwTimer objects list view example


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

Parameter name

Description

Period addr

Pointer to the period that contains lwTimers

Valid period

Is lwTimer period component valid.

Period

Period (in ticks) of the timer queue.

Expiry

Number of ticks that have elapsed in the period.

Wait

Number of ticks to wait before starting to process the queue.

Timer addr

Pointer to the lwTimer.

Valid timer

Is lwTimer timer component valid.

Timer function

Function that is called when the timer expires.

Parameter ptr

Parameter that is passed to the timer function.












Timer view

The MQX Timer List view displays detailed information about all available timer parameters.

Figure 8 depicts an example of timer snapshot. Each row with the same color, represents one timer with multiple parameters.


Figure 8: Timer objects list view example


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

Parameter name

Description

Timer addr

Pointer to the timer structure.

ID

timer ID.

Uses ticks

Does timer uses ticks or milliseconds.

Mode

Time to use when calculating the time to expire.

Type

Type of timer.

Cycle

The requested timer frequency.

Expiration time

Time when to start the timer.

Function

Function that is called when the timer expires.

Function parameter ptr

Parameter that is passed to the timer function.

Task

Task requesting this service.










Memory Pool view

The MQX Memory Pool List view displays detailed information about all available memory pool parameters.

Figure 9 depicts an example of memory pool snapshot. Each row with the same color, represents one memory pool with multiple parameters.


Figure 9: Memory pool objects list view example


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

Parameter name

Description

Pool ID

Memory pool ID.

Valid

Is memory pool component valid.

Pool addr

Pointer to the memory pool structure.

Memory used

The highest memory location allocated from kernel memory.

Memory size

The size of the memory pool in bytes.

Block in error

The memory block that caused the error.















MSG Pool view

The MQX MSG Pool List view displays detailed information about all available MSG pool parameters.

Figure 10 depicts an example of MSG pool snapshot. Each row with the same color, represents one MSG pool with multiple parameters. Double click on the item will open new window with more detailed description.


Figure 10: MSG pool objects list view example


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

Parameter name

Description

MSG pool addr

Pointer to the task MSG pool structure.

Valid

Is MSG pool component valid.

Size

Current number of messages on the free list.

Max size

Maximum number of messages on the free list.

Grow number

Memory pool grow number

Grow limit

The maximum number of messages allowed to be in the pool.

Type

The type of the message pool MSG POOL or SYSTEM MSG POOL.













MSG Queue view

The MQX MSG Queue List view displays detailed information about all available msg queue parameters.

Figure 11 depicts an example of msg queue snapshot. Each row with the same color, represents one msg queue with multiple parameters. Double click on the item will open new window with more detailed description.


Figure 11: MSG Queue objects list view example


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

Parameter name

Description

MSGQ addr

Pointer to the MSGQ structure

Queue num

Queue number.

Num of entries

The current number of messages on the queue.

Max entries

The maximum number of messages that can be placed on this queue.

Type

The type of this queue: MSG QUEUE or SYSTEM MSG QUEUE.

Task name

Owner task (task which OPENED) the queue.

Notification function

A function can be called asynchronously when a message is put onto the message queue.

Notification function param

Parameter passed to the notification function.










MSG view

The MQX MSG List view displays detailed information about all available MSG parameters.

Figure 12 depicts an example of MSG snapshot. Each row with the same color, represents one MSG with multiple parameters. This window will open on double click on item in MSG queue or MSG pool.


Figure 12: MSG objects list view example


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

Parameter name

Description

MSG addr

Pointer to the internal message structure.

Valid

Is MSG component valid.

Free

Is this a free message.

Queued

Is this a queued message.

Task name

Task that owns this message.

Message

The actual message whose address is given to the application.