|
| 1 | +--- |
| 2 | +title: "pyOCD 0.42.0 released" |
| 3 | +date: 2025-12-16 |
| 4 | +categories: |
| 5 | + - release |
| 6 | +tags: |
| 7 | + - news |
| 8 | + - release |
| 9 | + - release-patch |
| 10 | + - pyocd |
| 11 | +author: Teo Mahnic |
| 12 | +excerpt: "Introducing a new `run` subcommand capable of running targets until a time limit or EOT." |
| 13 | +--- |
| 14 | + |
| 15 | +Version 0.42.0 of pyOCD has been released and is available from PyPI. This release introduces a new subcommand, |
| 16 | +a number of improvements and bug fixes. The complete list is shown below. |
| 17 | + |
| 18 | +To upgrade pyOCD, just run `pip`: |
| 19 | + |
| 20 | +``` |
| 21 | +pip install --upgrade pyocd |
| 22 | +``` |
| 23 | + |
| 24 | +The latest pyOCD release focuses on strengthening automation workflows, led by the introduction of the new |
| 25 | +`run` subcommand. This command enables time-limited or EOT-terminated execution, making it well suited for |
| 26 | +CI/CD environments that require deterministic behavior. It provides unified access to semihosting and SWV |
| 27 | +streams, offering consistent console output and optional input handling during automated runs. |
| 28 | + |
| 29 | +A new standard I/O routing layer refines how output is managed across cores. The framework consolidates |
| 30 | +routing logic and supports console, telnet, file, and disabled modes, creating a uniform mechanism that |
| 31 | +simplifies multi-core scenarios. |
| 32 | + |
| 33 | +Integration with [CMSIS-Toolbox Run and Debug Management](https://open-cmsis-pack.github.io/cmsis-toolbox/YML-CBuild-Format/#run-and-debug-management) |
| 34 | +has also been strengthened. Configuration from `*.cbuild-run.yml` files now occupies a lower priority tier, |
| 35 | +sitting beneath command-line arguments and general session options to preserve explicit user intent. |
| 36 | + |
| 37 | +Additional improvements include new flash programming options, relaxed flash algorithm requirements, |
| 38 | +updated Zephyr RTOS thread state definitions, and expanded architecture support - most notably |
| 39 | +Cortex-M52 and Star-MC3 devices. |
| 40 | + |
| 41 | +Thanks again to all the contributors who helped make this release possible! ❤️ |
| 42 | + |
| 43 | +[v0.42.0 on GitHub](https://github.com/pyocd/pyOCD/releases/tag/v0.42.0) \ |
| 44 | +[v0.42.0 on PyPI](https://pypi.org/project/pyocd/0.42.0) |
| 45 | + |
| 46 | +---- |
| 47 | + |
| 48 | +## New Features |
| 49 | +- `run` subcommand: |
| 50 | + - Introduce a new `run` subcommand capable of running targets until a time limit or EOT (suited for CI/CD workflows) |
| 51 | + - Supports semihosting console output/input and SWV output |
| 52 | + |
| 53 | +## Improvements |
| 54 | +- Standard I/O routing: |
| 55 | + - Add new abstraction layer to unify STDIO routing for each core |
| 56 | + - Routing support for `console`, `telnet`, `file` and `off` |
| 57 | +>Note: Currently only output is supported |
| 58 | +- [CMSIS-Toolbox Run and Debug Management](https://open-cmsis-pack.github.io/cmsis-toolbox/YML-CBuild-Format/#run-and-debug-management) integration: |
| 59 | + - Add configuration layer in session options, which sits below command line arguments |
| 60 | + - Disable `*.cbuild-run.yml` processing if the `target_override` option is set |
| 61 | + - Improve port assignment logic for multi-core GDBServer and telnet configurations |
| 62 | + - Add processing for `connect` mode configuration |
| 63 | + - Add processing for `pre-reset` and `post-reset` options in `load-setup` configuration |
| 64 | + - Improve error messages for missing or invalid `*.cbuild-run.yml` file |
| 65 | + - Improve checking for required files |
| 66 | + - Raise a warning instead of an error for missing SVD files |
| 67 | + - Load SVD files only when available and when used by the subcommand |
| 68 | +- Flash programming: |
| 69 | + - Add new session options for configuring `pre-reset` and `post-reset` type in `load` subcommand |
| 70 | + - Relax flash algorithm requirement to require only RO section |
| 71 | +- RTOS: |
| 72 | + - Update Zephyr thread state definitions to match modern versions (@mathieuchopstm) |
| 73 | +- CoreSight and Cortex-M: |
| 74 | + - Add support for Cortex-M52 and Star-MC3 based devices (@Liu-Gu) |
| 75 | + - Skip adding cores not described in the debug topology while retaining direct AP access |
| 76 | + |
| 77 | +## Fixes |
| 78 | +- Cortex-M: |
| 79 | + - Fix incorrect reset type used in the fallback mechanism when the requested DebugSequence doesn't exist |
| 80 | +- CMSIS-DAP: |
| 81 | + - Fix HID report sizing logic across platforms |
| 82 | +- CMSIS-Packs: |
| 83 | + - Correct path normalization inside pack archives to support `..` in file paths (@xoriath) |
| 84 | + |
| 85 | +## Other |
| 86 | +- Minor documentation updates related to session option usage |
| 87 | + |
| 88 | +## New Contributors |
| 89 | +* @Liu-Gu made their first contribution in https://github.com/pyocd/pyOCD/pull/1852 |
| 90 | +* @mathieuchopstm made their first contribution in https://github.com/pyocd/pyOCD/pull/1823 |
| 91 | +* @xoriath made their first contribution in https://github.com/pyocd/pyOCD/pull/1867 |
| 92 | + |
| 93 | +**Full Changelog**: https://github.com/pyocd/pyOCD/compare/v0.41.0...v0.42.0 |
0 commit comments