Skip to main content

ZView, a Zephyr RTOS runtime visualizer

Reason this release was yanked:

broken module environment

Project description

ZView, a Zephyr RTOS runtime visualizer

Zephyr RTOS system-wide runtime visualizer via SWD probe!

Take a broader look on your Zephyr application with a non-heavy, small footprint, Kconfig-only thread stats analyser.


Prerequisites

To properly analyze your Zephyr app, your ELF binary must be compiled with specific Kconfig options enabled:

## prj.conf
CONFIG_INIT_STACKS=y            # Required for stack watermarks
CONFIG_THREAD_MONITOR=y         # Required for thread discovery
CONFIG_THREAD_STACK_INFO=y      # Required for thread metadata

# Optional Features
CONFIG_THREAD_NAME=y            # Enables thread name display
CONFIG_THREAD_RUNTIME_STATS=y   # Enables CPU usage tracking
CONFIG_SYS_HEAP_RUNTIME_STATS=y # Enables heap runtime stats

Manual Installation

Install ZView in your Python virtual environment:

# From the root of the zview repository
pip install -e .

Or directly through pip:

pip install zview

How to Use

Running from the CLI (manual mode)

zview -e build/zephyr/zephyr.elf -r runner -t runner_mcu_descriptor

Integrated West Command

On your project west environment, with your board flashed and probed, run:

west update zview
west zview

This can be achieved by adding this snippet to your west manifest:

manifest:
  projects:
    - name: zview
      path: tools/zview
      revision: main
      url: https://github.com/wkhadgar/zview

CLI Arguments

Argument Description
-e, --elf-file Path to the firmware .elf file.
-r, --runner Manually select jlink or pyocd.
-t, --runner-target MCU descriptor name, as used by the choosen runner.
--period Update period in seconds, can be float.

How it works

ZView achieves a minimal footprint by avoiding on-target processing or UART/Shell output. It utilizes the debug probe's ability to read memory via the APB bus without halting the CPU. By parsing the ELF file, ZView identifies kernel object locations and performs analysis of stack watermarks and CPU usage.

[!NOTE] The idle thread is implicit and only express itself on the used CPU %, when available.


Navigation

ZView acts as a TUI. Navigate with UP and DOWN arrows from the default view:

  • ENTER: Track CPU usage for a specific thread (hit ENTER again to return).
  • S / I: Sort the data and Invert the sorting order.
  • H: Access the Heap Runtime visualization.

TUI navigation

TUI navigation 2

TUI tread tracking

TUI heap navigation

TUI heap_navigation

Roadmap

Based on community feedback, the following features are in development:

  • Detailed thread metrics (e.g., context switch counts).
  • Live global variables tracking

Also, Feel free to open an issue if you feel like this has some potential!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zview-0.5.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zview-0.5.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file zview-0.5.1.tar.gz.

File metadata

  • Download URL: zview-0.5.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zview-0.5.1.tar.gz
Algorithm Hash digest
SHA256 515bd5dfcb882f5dfced91cf9ee856b17ce5da29687e5d430e2473ceff9649d6
MD5 dd4c9d07aa2911f5f3e816d51acb2917
BLAKE2b-256 4757f3393f13ed4d2885178c8542196ad8af194f0532ab33405fc0b6b1ceda50

See more details on using hashes here.

Provenance

The following attestation bundles were made for zview-0.5.1.tar.gz:

Publisher: version_release.yml on wkhadgar/zview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zview-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: zview-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zview-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 25d7bb0e988540402c41bd26af786062a14c15b756411e5f1abda763e2511d2c
MD5 78ebf559eb40332bbedde59fb34e137a
BLAKE2b-256 415394ef685259499e384e62ed41dd7df968ffca64933a715f2032e9da268dbf

See more details on using hashes here.

Provenance

The following attestation bundles were made for zview-0.5.1-py3-none-any.whl:

Publisher: version_release.yml on wkhadgar/zview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page