Skip to content

Releases: pyocd/pyOCD

v0.34.1

06 Jul 19:46
v0.34.1
9da9ec0

Choose a tag to compare

v0.34.1 on PyPI

Fixes

  • Options: Fix session option parsing for multi-type options (Thanks @svenuniku)
  • load subcommand: Correctly handle valid paths containing '@' characters. (Issue #1424.)
  • SWV: Fix error checking for a valid TPIU. This only affected systems where the TPIU could not be found. (One of the issues in #1368.)
  • gdbserver: Correct an exception caused by another handling another exception. (Issue #1387.)
  • gdbserver: Cleanly handle some corner cases of the qXfer commands.
  • gdbserver: Explicit check for read features annex being 'target.xml', and that the annex is empty for other objects. (Issue #1387.)
  • STLink: Fix broken non-word-aligned 8-bit transfers. (Fixes #1409.)
  • Boards: Correct the default target type for the MIMXRT1160-EVK board. (Fixes #1411.)
  • Packaging: Fix signed commit parse issue in setuptools_scm by requiring a newer version. (Fixes #1400.)
  • Packaging: Update the .gitarchival.txt template to support the built-in git archive support in setuptools_scm.
  • DFP: Address a failure to use DFP-based target types with a dash (or other non-alphanumeric characters) in their name.

Full Changelog: v0.34.0...v0.34.1

v0.34.0

30 May 22:39
v0.34.0
800abc3

Choose a tag to compare

v0.34.0 on PyPI

Additions

  • Probes: Vega VT-LinkII probe support (Thanks @Entropy98)
  • Cortex-M: Arm China Star-MC1 processor support
  • Cortex-M: Add Cortex-M85 CoreSight IDs
  • Commands: rmwatch optionally accepts type and size.
  • STLink: hnonsec and hprot support.
  • CMSIS-DAP: Support v2.1 target and board name support.
  • Flash: Add a stack canary to tell if the flash algorithm overflows its stack.

Boards and targets

  • Maxim: Add MAX32670EVKIT board and max32670 target. (Thanks @ozersa)
  • Nuvoton: Add support for NuMaker-IoT-M467 board and m467hjhae target. (Thanks @ychsu-tf)
  • HDSC: Added new targets for HC32F451 and HC32F452. Added hc32m120x6 target. (Thanks @lennvn)
  • NXP LPC55xx: Fix reset halt corner cases with forced halt.
  • HDSC target family notes in docs (Thanks @jeffreyabecker)

Changes and fixes

  • CoreSight: Fix GenericMemAPTarget issues.
  • CoreSight: ST DBGMCU component ID, log designer name.
  • list subcommand: set default log level to error
  • reset subcommand: Fix hardware reset, halt option, and session option integration.
  • rtt subcommand: improve performance for finding control block. (Thanks @te-johan)
  • Commands: Fix set option command.
  • Commands: Add -n arg for find command.
  • Zephyr RTOS: Interpret thread priority as signed 8-bit integer.
  • CMSIS-DAP: Fix search for devices without UID (Thanks @martjoly)
  • CMSIS-DAP: Consistent USB timeouts.
  • Cortex-M: Add some missing CoreSight IDs for Cortex-M55.
  • Cortex-M: Correct some connect and disconnect issues.
  • Cortex-M: Fix a regression where the core would always be resumed on connect in some cases.
  • SWV: Handle lack of ITM or TPIU.
  • Flash: Init flash algo with default reset type instead of always using software reset.
  • Flash: Clean up confusing log messages related to mass erase.
  • Flash: Increase FLM stack size, stack canary and halt checks, generator script improvements
  • Flash: Fix issues when overriding a flash region's algo with an FLM.
  • Log messages: normalise error log messages to start with "Error:".
  • CMSIS-Pack: Support "Dname" attribute for variants.
  • User scripts: Add missing MemoryLoader to Python namespace.

Packaging

  • Make pyocd-pemicro dependency optional. It can be installed simultaneous with pyocd by using the pemicro extra, e.g. pip install pyocd[pemicro]. This resolves crashes in PowerShell on exit of pyocd.
  • Remove elapsedtimer dependency.

Full Changelog: v0.33.1...v0.34.0

v0.33.1

07 Feb 19:36
v0.33.1
6a6fa28

Choose a tag to compare

v0.33.1 on PyPI

Fixes

  • Zephyr RTOS: Fix reading thread name and update debug symbol names. (Thanks @MaureenHelm)
  • STLink: Fix USB timeout errors when listing or connecting to very recent versions of STLinkV2 firmware by correcting the read size for the JTAG_GET_BOARD_IDENTIFIERS command.

Full Changelog: v0.33.0...v0.33.1

v0.33.0

23 Jan 23:13
v0.33.0
0a4b44c

Choose a tag to compare

Additions

  • Basic SEGGER RTT read/write support with an rtt subcommand. This subcommand streams stdio from/to the target. It works with all debug probe types, not only J-Link. (Thanks @mikisama, @ccattuto)
  • There is no longer a need to install libusb separately when installing pyocd. The libusb-package Python package was created so that an up to date libusb library can be automatically installed along with pyocd on all OSes.
  • Log output is now colorized by default when outputting to a tty. The --color command line argument controls this feature. Also simplified the log output formatting so it is easier to read.
  • Commander: Add -x/--execute argument to run commands from a file. Multiple command files can be run and mixed with -c commands.
  • Commander: Add -i/--interactive to stay in REPL after running commands from either a file or command line.
  • Commander: Introduce the @command decorator that can be used in user scripts to create user-defined commands, accessible from Commander and as gdbserver monitor commands. See the documentation for details.

Boards and targets

  • Add Maxim MAX32660 target and MAX32660EVSYS board. (Thanks @ozersa)
  • Correct RAM size of Maxim MAX32630 to 512 KiB.
  • Add several NXP board IDs: FRDM-K32L3A6, TWR-KM35Z75M, MIMXRT1160-EVK, FRDM-KW38, USB-KW38, KW38-ER-RD.
  • Add micro:bit v2 board IDs. (Thanks @mbrossard)
  • NXP LPC55xx family: re-unlock debug access after reset. (Thanks @LeBlue)

Changes and fixes

  • Cortex-M: Fix regression with writing CFBP and xPSR subregisters (CONTROL, FAULTMASK, BASEPRI, PRIMASK, and xPSR variants).
  • Gdbserver: While the target is running (continue command in gdb), retry reading target status within a timeout after the first fault on such a check. This is intended to primarily help with firmware putting the core to sleep. The debug.status_fault_retry_timeout session option controls the timeout; set it to 0 to disable this experimental feature.
  • Commander: Fix broken Python ("$") and system ("!") commands in certain cases.
  • Commander: The shell-like lexer for commands has been replaced with a custom lexer that is simpler and more predictable. It breaks words on all non-alphanumeric characters except dash (for instance, "mem-ap" is considered one word). Single and double quoted values with backslash-escapes are supported.
  • Commander: If a user script has been loaded, Python '$' commands share the user script's namespace.
  • Commands: Add flushprobe command that ensures all outstanding transfers on the probe have been completed.
  • Commands: Fix reg output so it is properly redirected when called as a gdbserver monitor command.
  • Commands: reg and wreg' improvements. -poption to force lookup as peripheral register.regwill print any number of registers. Addrrandwr` aliases.
  • User scripts: print() calls from user scripts get routed through any output direction, for example, such that the output will appear in the gdb console when a user-defined command is called as a gdbserver monitor command.
  • Flash: Change default value of keep_unwritten session option to false.
  • CMSIS-DAP: Better handling of protocol versions.
  • CMSIS-DAP: All USB backends have a USB packet trace logger.
  • CMSIS-DAP: Add cmsis_dap.prefer_v1 session option that forces pyocd to use the CMSIS-DAP v1 interface on a debug probe that provides both v1 and v2. (Naturally, the default is to choose v2, since it is faster.) This is intended primarily for testing.
  • CMSIS-DAP: Introduced timeouts for USB reads.
  • CMSIS-DAP: Limit number of outstanding command packets to 30 on macOS using hidapi for CMSIS-DAP v1. This fixes a failure that occurred when certain memory transfers due to an in-built limit on the queue size in the macOS version of hidapi.
  • CMSIS-DAP: Update list of known CMSIS-DAP probes; correspondingly update udev rules.
  • STLink: use JTAG_GET_BOARD_IDENTIFIERS command to read board ID faster than extracting it from the "mbed.htm" file on the MSD volume. Requires V2J36 or V3J6 firmware versions.
  • STLink: Setting the SWD frequency on an STLinkV3 was completely broken, and is now fixed.
  • STLink: Add stlink.v3_prescaler session option to control the internal HCLK prescaler on the probe, which affects the set of available SWD/JTAG and other I/O frequencies.
  • Probe server: Fix race causing server to terminate immediately is certain rare cases.
  • Probe server: Improve connect/disconnect log messages.
  • Session options: Probe-specific options in a config file takes precedence over global options.
  • Session options: A warning is logged if a multiple probe-specific option sections in a config file match the active debug probe's UID.
  • Session: Change the working directory to the project directory on session creation.
  • Gdbserver: Cleanup and fix connection disconnect code. This changes behaviour if the gdb disconnect command is used so that the persist option is honoured (disconnect previously would never cause the gdbserver to stop). (Thanks @claymation)
  • Gdbserver: exit monitor command that will shut down all gdbservers and quit pyocd.
  • Gdbserver: Handle connection aborted and reset errors more cleanly.
  • Gdbserver: Better logging of RTOS discovery issues, and only one log message is output when attempting to load RTOS plugins, in addition to a message on successful load.
  • CoreSight DAP: Unlock probe on error. (Thanks @claymation)
  • CoreSight: Don't read CoreSight registers for non-CoreSight components. (Thanks @j4cbo)
  • CoreSight: Set CSW.DBGSWEN for CSSoC-400 APB-AP to resolve an issue that caused DBGMCU (and other) peripherals to be inaccessible on certain STM32 devices, and likely similar issues on other devices.
  • Dependencies: Switch from naturalsort to natsort. (Thanks @dvzrv)

Python API

  • Introduced type annotations to a number of the most important parts of the pyocd source code.
  • Add CoreTarget class, a superclass of Target instances for CPU cores.
  • Ensure set_clock() works with float parameters for all probe drivers.
  • J-Link: Fix is_reset_asserted() method.

Testing

  • A new CI board farm is up and running the functional test suite with Azure Pipelines on macOS, Linux, and Windows. All test results are publicly accessible.
  • Improved command tests.
  • Fixed a number of small functional test failures in CI.
  • automated_test.py supports remote probes in its -b argument.
  • Fix issues in the semihosting unit test and restore telnet tests.

Other

  • scripts/generate_flash_algo.py: Removed the useless part of the standard flash algo blob header, leaving only the required breakpoint.

Many thanks to all the contributors who helped make this release possible! ❤️

Full Changelog: v0.32.3...v0.33.0

v0.32.3

31 Dec 00:09
v0.32.3

Choose a tag to compare

v0.32.3 on PyPI

Fixes

  • J-Link: Fix SWO that was completely broken due to an invalid attribute name.
  • STLink: Fix typo in USB PID map that caused probes with PID 0x3752 to be ignored.
  • NXP i.MX RT family: Fix log exception if the vector table can't be determined.
  • SWO: Fix invalid reference to collections.Iterable.
  • Commander: Correct alignment of ASCII column in a hex dump with ragged end.
  • CoreSight: Fix printing of negative addresses ROM table in certain cases.
  • CoreSight: Power down DP only if resuming on disconnect.
  • Flash: Fix flash unmodified page detection regression, causing optimized flash programming to not work.
  • gdbserver: Return T response containing no register values if reading registers fails, perhaps if the core failed to halt.
  • Package metadata: Correct URLs and classifiers.

Full Changelog: v0.32.2...v0.32.3

v0.32.2

10 Dec 21:32
v0.32.2
6b78875

Choose a tag to compare

v0.32.2 on PyPI

Fixes

  • Fix STM32l0x6 erase. (thanks @michieldwitte!)
  • Fix issues with parsing of bool session options
  • commander: fix broken semicolon-separated commands from -c argument.
  • docs: Fix a few typos (thanks @timgates42!)

Full Changelog: v0.32.1...v0.32.2

v0.32.1

18 Oct 20:41
v0.32.1
8f21645

Choose a tag to compare

v0.32.1 on PyPI

Additions

  • Explicit Python 3.10 support and 3.10 wheels.
  • JLinkProbe: added jlink.non_interactive option.

Targets

  • Update flash algo for lpc55s36. (thanks @Hoohaha!)

Fixes

  • Session options: correctly handle session options with float values from the command line.
  • Board: log description of exception during uninit.
  • JLinkProbe: only connect if jlink.device is set.
  • CortexM: fixed missing format args for warnings from post reset checks.
  • Packs: correct which vendor is output for find and show.

Packaging

  • Packaging: dependency version bumps and classifier update. This fixes the issue with a pyyaml version conflict.
  • Packaging: bump cmsis-pack-manager to v0.4.0 release.

CI

  • Workflows: add Python 3.10 to basic test.

Full Changelog: v0.32.0...v0.32.1

v0.32.0

07 Sep 21:52
v0.32.0
2c4fad7

Choose a tag to compare

v0.32.0 on PyPI

Additions

  • Firmware images and data will be loaded to RAM regions in addition to existing flash programming, using the same programming methods as before.
  • The new load subcommand is an alias of flash, and is now the default name for that subcommand.
  • The load (and flash) subcommand will program multiple files passed on the command line. Binary files can have a @<address> suffix added to the file name to supply the base address at which they should be programmed.
  • Flash operations now have individual timeouts controllable with session options.
  • Reset: If performing a reset of any type causes the connection to the target's debug interface to be lost, pyocd will automatically reconnect.
  • Reset subcommand: --core and --halt arguments.
  • Cortex-M: when using the default cortex_m target type, the Cortex-M architectural memory map is supplied instead of having an empty memory map.
  • Config: Dashes are converted to underscores in the target type name, thus cortex-m is now equivalent to cortex_m.
  • CMSIS-DAP: support for reading the debug probe firmware version with CMSIS-DAP v2.1. The firmware version is output at the debug log level.
  • STLink-V3: add new USB product IDs.
  • CoreSight: the product name is logged when listing CoreSight components during discovery.
  • gdbserver: add 'init' monitor command, which is ignored and exists solely for OpenOCD compatibility to prevent a warning.
  • Config: The effective target type is saved back into into session options. This mostly affects on-board debug probes that know their target.
  • Packaging: transitioned to PEP517 style packaging.
  • Flash: programming progress bar widened.

Targets

  • STM32L475: fix address of DBGMCU.APB1FZR2 and DBGMCU.APB2FZR registers.
  • Musca-B1, Musca-S1: enable SYSRESETREQ from both cores.

Fixes

  • Resolve an issue where running pyocd in the background from the shell, i.e. by the & operator, would cause a hang.
  • CMSIS Packs: use RAM addresses specified in algorithm elements. This fixes a programming on a few devices, including the Nordic nRF5340.
  • Commander: fix printing of D core register values.
  • Commander: fix Python expression output formatting for int and str values.
  • CMSIS Packs: make flash region names unique when splitting by sector size.
  • load subcommand: tildes in file name paths are resolved.
  • Subcommands: fix and improve command line argument usage text.
  • Memory map: names of memory regions are made unique if necessary.
  • Cortex-M: add a few checks to hopefully prevent an exception seen once when listing IRQ names.
  • Flash: correct arguments passed to flash exceptions.
  • CoreSight: only identify unknown APs as MEM-APs if the designer is Arm. This prevents some proprietary APs as being incorrectly reported as a MEM-AP.
  • CMSIS-DAP: send only concrete SWD/JTAG port for connect, so that the "default" port type is never requested. This fixes connect for some versions of Microchip EDBG.

Documentation

  • Correct remote probe access documentation regarding remote access to the server and the --allow-remote argument.

Python API

  • MemoryMap now adheres to the Sequence ABC.
  • MemoryRegion.clone_with_changes() added.
  • DebugPort.disconnect() added.
  • FlashLoader class renamed to MemoryLoader to reflect RAM loading support. The old name is still available as an alias, but is deprecated.
  • Timeout class adds start() and clear() methods.

Thanks to all contributors, supporters, and users! ❤️

v0.31.0

11 Jul 23:57
v0.31.0
d9e84b0

Choose a tag to compare

v0.31.0 on PyPI

Additions

  • Changed the different operations of the pyocd pack subcommand to be subcommands, such as pyocd pack install --update nrf53, both as a UX improvement and a test of the new command line handling internals. The original options will still work but are deprecated.
  • Added a -L/--log-level argument to easily control the log level of individual module loggers without needing a full logging config. Example: -L*.cmsis_dap_probe=debug.
  • Support for PYOCD_PROJECT_DIR environment variable. (#1172 @g-arjones)

Boards and targets

  • Fixed the target type for many STMicro board IDs to match the part numbers in the CMSIS DFPs. (#1127 @jeromecoutant)
  • Added several STMicro board IDs: NUCLEO-G071RB, NUCLEO-L010RB, NUCLEO-WB15CC, DISCO-WB5MMG, NUCLEO-U575ZI-Q, B-U585I-IOT02A. (#1166 @jeromecoutant)
  • Add Nuvoton NuMaker-M2354 board ID and M2354KJFAE (m2354kjfae) built-in target. (#1132 #1167 @ychsu-tf)
  • Add NXP LPC55S26 (lpc5526) (#1139 @stephendpmurphy)
  • Add NXP LPC55S36 (lpc55s36) and MKE17Z256xxx7 (ke17z) targets. (#1174 @Hoohaha)
  • Update SVD files for NXP i.MX RT1170. (#1171 @Lucien-Zhao)
  • Add micro:bit v2 board ID and Nordic nRF52833 (nrf52833) target.

Fixes

  • CMSIS DFP target: prevent creation of overlapping memory regions from different processors.
  • NXP i.MX RT family: fix exception in set_reset_catch() when there was an invalid vector table address. (#1175 @Hoohaha)
  • Default to using pyusb CMSIS-DAP backend for BSD OSs.
  • Empty YAML config files are allowed.
  • Made the name of picoprobe plugin all lowercase to match other plugin names.

Internal

  • Refactored command line interface and subcommands into separate classes under the pyocd.subcommands package.
  • Lots of little fixes to resolve code quality issues reported by LGTM.

A big thanks to all contributors! ❤️

v0.30.3

31 Mar 18:40
v0.30.3
e993ffa

Choose a tag to compare

v0.30.3 on PyPI

Fixes

  • Picoprobe: fixed exception when libusb isn't installed, regardless of whether a Picoprobe is connected. #1126
  • CMSIS-DAP: hidapi and pywinusb backends synthesize probe unique IDs if the USB device doesn't report a serial number, just like the pyusb backends.
  • CMSIS-DAP: hidapi backend finds probes with the "CMSIS-DAP" string only in the USB interface name using a workaround for hidapi not make the interface name available through its API. #1121