PyOCD Versions Save

Open source Python library for programming and debugging Arm Cortex-M microcontrollers

v0.32.2

2 years ago

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: https://github.com/pyocd/pyOCD/compare/v0.32.1...v0.32.2

v0.32.1

2 years ago

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: https://github.com/pyocd/pyOCD/compare/v0.32.0...v0.32.1

v0.32.0

2 years ago

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

2 years ago

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

3 years ago

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

v0.30.2

3 years ago

v0.30.2 on PyPI

Fixes

  • Remove misleading warning about missing pywinusb on Windows. Only affected new installations that didn't already have pywinusb installed.

v0.30.1

3 years ago

v0.30.1 on PyPI

Fixes

  • Picoprobe: Fix exception that affected any probe if a UID was specified with no connected Picoprobes. #1116
  • CMSIS-DAP: Fix an exception that occurred when trace logging was enabled for pyocd.probe.cmsis_dap_probe. #1114
  • Setup: Remove some unused bits of setup.py.

v0.30.0

3 years ago

v0.30.0 on PyPI


This release of pyOCD makes some big changes!

  • Python 2 support has been removed. Version 0.29 is the last version to support Python 2.
  • Removed the long since deprecated pyocd-flashtool and pyocd-tool commands. pyocd-gdbserver has been held back from the chopping block for another time, since it is still used by some debugger integrations.

Additions

  • New debug probe plugin for the Raspberry Pi picoprobe protocol. (Thanks @newbrain!)
  • RTOS thread awareness for ThreadX, aka Azure RTOS. (Thanks @newbrain!)
  • The PEMicro debug probe plugin is now a standard dependency. (Thanks @Gargy007!)
  • The capstone disassembly package is now a standard dependency.

Boards and targets

  • Add Raspberry Pi Pico, aka RP2040, target. Either of the two M0+ cores can be accessed by using the rp2040_core0 or rp2040_core1 target type. The rp2040 target type is an alias for rp2040_core0. Both cores cannot currently be debugged simultaneously.
  • Add NXP LPC845 target, lpc845. (Thanks @Hoohaha!)
  • Added a family match pattern for NXP i.MX RT family devices. This means that RT device support from CMSIS-Packs will have the same workaround for reset logic as the built-in RT family target support.
  • Added new HDSC MCU series HC32F160 targets, hc32f160xa and hc32f160xc. (Thanks @lennvn!)
  • Added HDSC part numbers: hc32f460xc and hc32f460xe to HC32F460 series, and changed hc32m423 to hc32m423xa. (Thanks @lennvn!)
  • Add some new and missing STMicro board IDs.

Changes and fixes

  • GDBDebugContextFacade: Fix misspelled warning() method.
  • J-Link: Convert "unspecified error" to transfer fault.
  • CMSIS-DAP: Set default SWD number of idle cycles after each transfer to 2, per recommendations and to match other probes.
  • Probe server: Fix client/server wire_protocol property converter handling of a None value.
  • Dropped pywinusb dependency on Windows, in favour of hidapi that is more stable.
  • A few other dependency updates and changes.
  • CMSIS-DAP: If a probe doesn't provide a serial number string, pyusb will return None. In this case, pyocd now generates a unique ID from other device info. (Thanks @mentha!)
  • J-Link: Removed all special handling of the DP_SELECT register at the J-Link probe plugin level since it is now handled in the higher DP layer.
  • DP: Add a couple checks of APv2 and register addresses.
  • CMSIS-DAP: Only use extract a board ID from the USB serial number to for DAPLink firmware when reporting the probe description as for pyocd list.
  • CMSIS-Packs: Fixed off by 1 error in memory region overlap checking.
  • CMSIS-Packs: Handle lack of FlashDevice struct in .FLM files.
  • CMSIS-DAP: read protocol version.
  • CMSISDAPProbe: trace logging.
  • Flash: trace logger for flash algo operations.
  • Fixes for undefined symbols identified by flake8.
  • CMSIS-DAP: add more checks of DAP_Info responses.
  • Add command line alias --project alias for -j / --dir.

Python API

  • SWJSequenceSender: Refactored so that parts of SWJ/JTAG transition sequences can be sent.
  • DebugProbe: Added swd_sequence() and jtag_sequence() APIs.

Test

  • Replaced Travis-CI with GitHub Actions for executing the unit tests on multiple versions of Python 3.
  • Add probeserver_test.py functional test.
  • Shorten TestTimeout.no_timeout so it doesn't fail on certain systems.
  • Add test binary for nRF5340-DK.

v0.29.0

3 years ago

v0.29.0 on PyPI

As a reminder, support for Python 2 is deprecated and planned to be dropped from an upcoming release. If this is a problem for you moving forward, please raise your concerns in the Dropping Python 2 support discussion.

Additions

  • SWO: When enabled with the new swv_raw_enabled option, the raw SWO data is served over TCP port 3443 by default. The port is changeable with swv_raw_port option. (Thanks @patrislav1)
  • CoreSight: Many ID table additions and renames, including adding A-profile IDs so meaningful information will be printed when connecting to an A+M multicore device.
  • Probe server: Added --allow-remote argument to enable remote access to the probe server, as it now defaults to serve local-only, like the other TCP servers.
  • Commander: reset command accepts optional reset type.
  • Commander: show aps command to list DAP Access Ports.
  • Architectural DAP reconnection support. DebugPort.connect() can be called multiple times and it will do the right thing.
  • MEM-AP: Support for 64-256 bit transfers when the AP has the Large Data extension. Mostly only applies to A-profile and special devices.
  • API: Added 64-bit memory transfers support to the memory interface API.
  • Add a Code of Conduct, adapted from the Contributor Covenant.

Boards and targets

  • Add Arm Musca-S1 target and board. (Thanks @mathias-arm)
  • Add WIZwiki_W7500P board ID. (Thanks @ArthurRichard)
  • Add NXP i.MX RT1170 target and board. (Thanks @jhqian)
  • Fix NXP i.MX RT1015 memory map issue. (Thanks @Kris-b50122)
  • Updated NXP LPC5500 series with rev 1B debug unlock sequence. (Thanks @ttt-t3r)
  • Add family regex for NXP LPC5500 series, so the unlock logic will be applied to LPC5500 CMSIS-Packs.
  • Correct NXP LPC5500 series flash erase sector size. Even though the device supports 512-byte erase sectors, the flash algo will always erase 32 kB at a time.
  • For the NXP Kinetis family, ensure AP#0 is a MEM-AP before attempting to use it to test device connectivity. (Thanks @Hoohaha)
  • Add STMicro NUCLEO-L432KC board. (Thanks @trunet)
  • Correct STMicro STM32F429xG flash size. (Thanks @LONGZR007)
  • Correct STMicro STM32F412xE flash size. (Thanks @newbrain)

Changes and fixes

  • CMSIS-DAP: Flush command queue before sending SWO commands.
  • CMSIS-DAP: Improved swo_read() so it only locks and flushes when using the DAP_SWO_Data command instead of a dedicated SWO EP (which is supported by CMSIS-DAPv2).
  • MEM-AP: Restructured MEM_AP.init() to use a single read and restore of the CSW register.
  • CMSIS-DAP: Truncate unused bytes of a command buffer, so CMSIS-DAPv2 bulk packets only contain the command and no padding and prevent sending zero length packets to signal the end of a transfer. (Thanks @kkitayam)
  • Commander: Fixed selected core for gdbserver monitor commands to match the core associated with the gdbserver, and not have multiple gdbservers interfere with one another if the selected core is changed.
  • Commander: Fixed "no-init" mode.
  • Commander: Fix the probeserver command by wrapping the DebugProbe instance in the shared probe proxy.
  • Commander: Fix wreg on peripheral registers.
  • Always use the DebugPort object to perform resets, except for certain cases when the DebugPort doesn't exist yet (mostly "no-init" mode of Commander), so that pre- and post-reset notifications are sent.
  • DP: Rename DebugPort.init() to connect().
  • AP: Property and method for detecting whether the AP is enabled.
  • CoreSight discovery: Gracefully report failures to create CoreSight components.
  • CoreSight discovery: Add adi.v5.max_invalid_ap_count session option.
  • CoreSight discovery: fix a problematic error log message.
  • FreeRTOS: Fix r12 offset for FPU-enabled normal frame.
  • Numerous small fixes and code improvements to resolve issues identified by LGTM.
  • Add scripts/generate_flash_algo.py tool, copied from the FlashAlgo project and simplified.

Documentation

  • Some improvements to main readme.
  • Terminology additions.
  • Improve adding_new_targets.md.

Test

  • Renamed gdb_script.py to gdb_test_script.py.
  • Moved functional test output files to test/output/ directory.
  • Add ElfReaderContext test to debug_context_test.py.
  • Add commander_test.py.
  • Hex-encode XML-incompatible characters in test result XML.
  • Fixed semihosting unit test issues.

v0.28.3

3 years ago

v0.28.3 on PyPI

Fixes

  • Semihosting: fix Python 3 string/bytes issues and unit test problems.
  • pyocd-gdbserver: fix regression preventing the server from starting.
  • CMSIS-DAP: fix Atmel-ICE compatibility issue. (Thanks @patrislav1)
  • CMSIS-Packs: identify DFP memory regions by address space in addition to names. (Thanks @DrTobe)
  • CMSIS-DAP: update list of known CMSIS-DAP probes.
  • J-Link: fix several issues that appeared when another process has a J-Link open.