pyOCD 0.42.0 released
Dec 16, 2025
Teo Mahnic
Version 0.42.0 of pyOCD has been released and is available from PyPI. This release introduces a new subcommand, a number of improvements and bug fixes. The complete list is shown below.
To upgrade pyOCD, just run pip:
pip install --upgrade pyocd
The latest pyOCD release focuses on strengthening automation workflows, led by the introduction of the new
run subcommand. This command enables time-limited or EOT-terminated execution, making it well suited for
CI/CD environments that require deterministic behavior. It provides unified access to semihosting and SWV
streams, offering consistent console output and optional input handling during automated runs.
A new standard I/O routing layer refines how output is managed across cores. The framework consolidates routing logic and supports console, telnet, file, and disabled modes, creating a uniform mechanism that simplifies multi-core scenarios.
Integration with CMSIS-Toolbox Run and Debug Management
has also been strengthened. Configuration from *.cbuild-run.yml files now occupies a lower priority tier,
sitting beneath command-line arguments and general session options to preserve explicit user intent.
Additional improvements include new flash programming options, relaxed flash algorithm requirements, updated Zephyr RTOS thread state definitions, and expanded architecture support - most notably Cortex-M52 and Star-MC3 devices.
Thanks again to all the contributors who helped make this release possible! ❤️
v0.42.0 on GitHub
v0.42.0 on PyPI
New Features
runsubcommand:- Introduce a new
runsubcommand capable of running targets until a time limit or EOT (suited for CI/CD workflows) - Supports semihosting console output/input and SWV output
- Introduce a new
Improvements
- Standard I/O routing:
- Add new abstraction layer to unify STDIO routing for each core
- Routing support for
console,telnet,fileandoffNote: Currently only output is supported
- CMSIS-Toolbox Run and Debug Management integration:
- Add configuration layer in session options, which sits below command line arguments
- Disable
*.cbuild-run.ymlprocessing if thetarget_overrideoption is set - Improve port assignment logic for multi-core GDBServer and telnet configurations
- Add processing for
connectmode configuration - Add processing for
pre-resetandpost-resetoptions inload-setupconfiguration - Improve error messages for missing or invalid
*.cbuild-run.ymlfile - Improve checking for required files
- Raise a warning instead of an error for missing SVD files
- Load SVD files only when available and when used by the subcommand
- Flash programming:
- Add new session options for configuring
pre-resetandpost-resettype inloadsubcommand - Relax flash algorithm requirement to require only RO section
- Add new session options for configuring
- RTOS:
- Update Zephyr thread state definitions to match modern versions (@mathieuchopstm)
- CoreSight and Cortex-M:
- Add support for Cortex-M52 and Star-MC3 based devices (@Liu-Gu)
- Skip adding cores not described in the debug topology while retaining direct AP access
Fixes
- Cortex-M:
- Fix incorrect reset type used in the fallback mechanism when the requested DebugSequence doesn’t exist
- CMSIS-DAP:
- Fix HID report sizing logic across platforms
- CMSIS-Packs:
- Correct path normalization inside pack archives to support
..in file paths (@xoriath)
- Correct path normalization inside pack archives to support
Other
- Minor documentation updates related to session option usage
New Contributors
- @Liu-Gu made their first contribution in https://github.com/pyocd/pyOCD/pull/1852
- @mathieuchopstm made their first contribution in https://github.com/pyocd/pyOCD/pull/1823
- @xoriath made their first contribution in https://github.com/pyocd/pyOCD/pull/1867
Full Changelog: https://github.com/pyocd/pyOCD/compare/v0.41.0…v0.42.0