Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.366

Zephyr

On this page:

Introduction

Requirements

Timers window

Threads window

 

 

Introduction

This plugin shows information about threads in the Zephyr operating system. Profiling is also supported.

 

Profiling

The running thread profiling is supported for Zephyr. This means that the information about whether a thread is running or not is available, but there’s no detailed state info.

No additional winIDEA configuration is needed.

 

The thread name is shown in the Profiler Timeline if available at Analyzer Session start. The CONFIG_THREAD_NAME configuration option is required for this. If a thread name is not already set, you can use the function k_thread_name_set. Refer to the Zephyr documentation for more information.

 

 

Requirements

The Zephyr kernel must be compiled with the CONFIG_THREAD_MONITOR configuration option enabled. Depending on what information you want to see, additional options may need to be enabled.

 

Context switching (the ability to see the registers of each thread when the CPU is stopped, including the program counter and stack pointer, with the Tasks Window) is only supported on Cortex-M devices. On other devices or architectures, winIDEA will be able to display thread information, but you will only be able to see the registers of the currently running thread. Context switching may also not work if Zephyr is running on more than one CPU core.

 

 

Timers window

The Timers window shows information about all timers in the system. To open it go to View | [<application name>] Zephyr | Timers.

 

Zephyr-Timers-window

 

The following configuration options must be enabled to display the timers:

CONFIG_TRACING

CONFIG_TRACING_OBJECT_TRACKING

CONFIG_TRACING_TIMER

 

 

Column name

Description

Address

Address of the timer structure. A variable name is also shown if it is found in the symbol information.

State

The current state of the timer. Possible values are:

RUNNING: The timer is active.

INACTIVE: The timer is inactive.

UNKNOWN: The timer state could not be determined.

ERROR: There was an error reading the timer information. All the information for this timer is invalid.

Period

The period in ticks, specifying the interval between all timer expirations after the first one. A tick is an internal count of the kernel, configurable via CONFIG_SYS_CLOCK_TICKS_PER_SEC.

Expiry Function

The function that is executed each time the timer expires.

When possible, the function name is displayed. Otherwise the address is shown. The value [NONE] means that no function is configured.

Stop Function

The function that is executed if the timer is stopped prematurely while running.

When possible, the function name is displayed. Otherwise the address is shown. The value [NONE] means that no function is configured.

Status

The number of expirations since the status value was last read.

 

 

Threads window

The Threads window shows information about all threads in the system. To open it go to View | [<application name>] Zephyr | Threads.

 

Zephyr-Threads-window

 

 

i-icon

Because the Zephyr kernel has many configuration options, some information is only displayed when the corresponding options are enabled. Refer to the Zephyr documentation for their descriptions.

 

Column name

Description

Required configuration option

Name

Name of the thread as set by the k_thread_name_set function.

CONFIG_THREAD_NAME

State

Scheduling state of the thread, with the _THREAD_ prefix omitted. For running threads, the CPU they are running on is also displayed.

none

Total CPU Cycles

Total number of CPU cycles given to the thread since its creation.

CONFIG_SCHED_THREAD_USAGE

errno

Thread's errno variable.

CONFIG_ERRNO without CONFIG_ERRNO_IN_TLS and CONFIG_LIBC_ERRNO

Entry Function

Function that was passed as the entry parameter to the k_thread_create function when the thread was created.

none

Entry Parameter 1

Value that was passed as the p1 parameter to the k_thread_create function when the thread was created.

none

Entry Parameter 2

Value that was passed as the p2 parameter to the k_thread_create function when the thread was created.

none

Entry Parameter 3

Value that was passed as the p3 parameter to the k_thread_create function when the thread was created.

none

 

 

More resources

Tasks Window

 

 

 

Copyright © 2025 TASKING