Pyocd

Latest version: v0.36.0

Safety actively analyzes 630130 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 11

0.24.1

Fixes

- Fixed regression where programming an ELF file failed, caused by missing import. (Thanks DurandA!)

0.24.0

New features

- Support for legacy AP BASE register formats seen on early Cortex-A platforms. While Cortex-A cores are not supported yet, pyOCD can at least read the ROM tables and identify the cores now.
- Support for the new SWJ sequences introduced in ADIv5.2 with SWJ-DPv2. These sequences transition between SWD and JTAG by going through a dormant mode. By default, pyOCD will first attempt the deprecated SWJ sequences, then if that fails it will attempt the new sequences.
- New user options:
- `dap_protocol`: One of `swd`, `jtag`, or `default`. (JTAG is still not fully supported, but is getting closer.)
- `dap_enable_swj`: Whether SWJ sequences are sent (default True).
- `dap_use_deprecated_swj`: Whether to attempt deprecated SWJ sequences (pre-ADIv5.2). Most Cortex-M MCUs do _not_ support the new sequences.
- `probe_all_aps`: Force a scan of all 256 AP addresses instead of stopping the AP scan at the first invalid AP.
- `xpsr_control_fields`: Defines bitfields for XPSR and CONTROL registers when presented in gdb.

Boards and targets

- Added board ID for Embedded Planet Agora platform.
- Major refactoring of Cypress PSoC6 target support. (Thanks Cypress!)
- Nordic nRF52 APPROTECT security and unlock support. This works for both builtin and CMSIS-Pack targets. (Thanks nocko!)
- Fixed NXP LPC1768 reset and halt.
- Fixed Arm Musca-B1 software reset.
- Added test binaries for a handful of STMicro Nucleo boards.

Changes

- More debug log messages when operations like stepping are performed.


Fixes

- Fixed uninitialized variable reference in `FileProgrammer` that appeared when attempting to load ELF files. (782 and others. Thanks samkearney!)
- Fixed an issue where v8-M cores would cause the commander `show cores` command to raise an exception due to separate core type name lists for v6/7-M and v8-M. There is now a single core type name list.
- Improved handling of probes with multiple USB HID interfaces when using the pyusb backends.

Python API

- `DebugProbe.swj_sequence()` is added, plus `supports_swj_sequence` property indicating whether the probe can send arbitrary SWJ sequences using this API. Currently only CMSIS-DAP probes are capable of this.
- Fixed the JTAG sequence API in pyDAPAccess. (Not exposed at higher layers.)
- Renamed `link` attribute of `DebugPort` to `probe`.
- Refactored `MemoryMap` region search methods.
- Renamed `FlashRegion.is_erased()` to `is_data_erased()` which better reflects that it operates on passed-in data.
- Changed all the constants in `Target` to be enums.
- Removed the root context methods on `Target` that were unused.
- Added `Target.get_halt_reason()` method.
- Renamed `FlashReaderContext` to `ElfReaderContext`.
- Some new `GraphNode` methods.
- `MemoryCache` and `RegisterCache` were moved from `pyocd.debug.cache` to their own modules in a new subpackage `pyocd.cache`.
- Moved `GDBServerPacketIOThread` to its own module.
- Moved `FileProgrammer` and `FlashEraser` to their own modules under `pyocd.flash`.

Documentation

- Documented `MemoryMap` methods.
- New security features documentation. (Thanks nocko!)
- Split documentation of user options out from configuration documentation.
- Various little fixes and improvements.

0.23.0

New features

- Added a `connect_mode` option. It can be set to one of `halt`, `pre-reset`, `under-reset`, `attach`. The default is `halt`, retaining previous behaviour. In particular, `under-reset` can often be used to connect to out of control targets.
- Watchpoints in v8-M targets work now, with added support for DWT version 2.
- Several additions to the commander:
- `go` and `halt` report target state.
- `continue` and `c` aliases for `go`.
- `load` command to load any file, including hex or ELF. (`loadmem` only loads binary.)
- `fill` command for filling memory with patterns.
- `find` command to search for byte patterns in memory ranges.
- `watch`, `lswatch`, and `rmwatch` commands for managing watchpoints.
- Hex dumps now include an ASCII representation column.

Boards and targets

- New Cypress PSoC6 devices.
- Add NuMaker-M252KG board and M252KG6AE target.
- HDSC HC32F46X, HC32F120, and HC32M120 targets added.

Changes

- Removed `halt_on_connect` option in favour of the added `connect_mode` option. To get the behaviour of turning off `halt_on_connect` (the default was on), set `connect_mode` to `attach`.
- Tildes are expanded in ELF file paths.
- Description message included in exceptions raised for No ACK, SWD protocol error, or unrecognized CMSIS-DAP transfer response values.
- Explicitly denote support for Python 3.8.

Fixes

- Fixed bugs related to converting user options when set from the command line.
- Fixed `show option` in commander.
- Corrected an undefined attribute error if an invalid path to an ELF file is specified.
- Addressed concurrency issues with recent memory map changes. The target memory map is now deep copied for each session.
- Fix some minor deprecation warnings reported by Python 3.8.

0.22.0

Boards and targets

- Fixed regression with Cypress PSoC6 targets (680) and merged in cumulative PSoC6 updates from Cypress.
- Resolved a number of issues (but not all) with NXP LPC55S69.
- Update ST NUCLEO-H743ZI.
- Correct the wrong part number for MIMXRT1064-EVK board.
- Correct part number for ST NUCLEO-WB55RG board.
- Fix location of input data for flash algorithms in STM32F412xx target.
- Address an issue with the built-in target STM32L031x6 by disabling double buffered flash programming.
- New board IDs: DISCO-H747I (stm32h747xihx), NUCLEO-H743ZI2 (stm32h743zitx), micro:bit v1.5 (nrf51), Calliope-mini, MTS_MDOT_F405RG (stm32f405rg), MTS_DRAGONFLY_F411RE (stm32f411re), MTS_DRAGONFLY_L471QG (stm32l471qg), MTS_MDOT_F411RE (stm32f411re), XDOT_L151CC (stm32l151cc), MAX32620MBED (max32620), MAX32620HSP (max32620), MAX32625NEXPAQ (max32625), MAX32630MBED (max32630), MAX32630HSP3 (max32630), EV_COG_AD3029LZ (aducm3029), EV_COG_AD4050LZ (aducm4050), NUCLEO-L073RZ (stm32l073rz), LPC4337 (lpc4337), Teensy 3.1 (mk20dx256vlh7), L-Tek FF1705 (stm32l151cc), L-Tek FF-LPC546XX (lpc54606).

Changes

- Support running pyOCD with cmsis-pack-manager not installed, in which case managed CMSIS packs are not supported. This is primarily for running on small platforms like Raspberry Pi. See [installing_on_non_x86.md](https://github.com/mbedmicro/pyOCD/blob/master/docs/installing_on_non_x86.md) for more.
- Note in readme about using libusb 1.0.21 on Windows to work around a pyusb issue that only appears on that platform.
- Loading ELF files now uses the segments defined in the file rather than sections.

Fixes

- Fixed regression on quit option for terminal probe selection prompt.
- Gracefully handle cases where the "mbed.htm" file does not appear on STLink USB MSC volumes (695).
- Fix SVD model handling of unset derived attributes (688).
- Catching more USB related exceptions that can be caused by misbehaving devices.

0.21.0

New features

- STLinkV3 support.
- Adding and removing of breakpoints is optimized. The breakpoint manager keep track of requested breakpoints, and only modifies the FPB/BPU immediately before a resume or step. This is useful because gdb likes to remove all breakpoints, then re-add them each time it runs the target.
- Support for configuring log output. See the new [configuring logging documentation](https://github.com/mbedmicro/pyOCD/blob/master/docs/configuring_logging.md) for details.
- The `pyocd list` command gained some arguments to filter the output.

Boards and targets

- Added some additional NXP board IDs.
- Addressed some issues with Arm Musca-A1 and Musca-B1 support.

Changes

- More helpful warning if the generic "cortex_m" target type is selected.
- Logging of exception tracebacks can be controlled with the "debug.traceback" user option. Eventually this will default to false.
- Removed "soft_bkpt_as_hard" user option. This was from long ago, before pyOCD even supported soft breakpoints, and is no longer useful.
- Normalised the use of loggers, so each Python module has its own logger with the name of the module.
- The debug probe's firmware version is logged via a debug log message if known.
- A better error is reported if a CMSIS-Pack is not a valid zip file.
- More helpful error message if an unknown target type is specified.

Fixes

- Workaround for .FLM flash algorithms that have a page size larger than the sector size. In particular, this fixes the Keil flash algorithms for STM32L072 and L073.
- Fixed user option priorities and value parsing to work as one would expect. This is documented in the [configuration documentation](https://github.com/mbedmicro/pyOCD/blob/master/docs/configuration.md).
- Fixed built-in STM32L475 flash algorithm.
- Fixed some issues in the `FlashBuilder` class related to filling gaps in pages with no data to program.
- Fixed `Flash.program_phrase()`.
- Fixed the `CortexM.available_breakpoint_count` property.

Documentation

- Finished converting all Doxygen comments to Doxygen-enabled doc comments.
- Added a section about target types to the [target support documentation](https://github.com/mbedmicro/pyOCD/blob/master/docs/target_support.md).
- Added [terminology definition documentation](https://github.com/mbedmicro/pyOCD/blob/master/docs/terminology.md).

Python API

- Added some new exception classes, tied a few outstanding exception classes into the pyOCD exception hierarchy, and made sure the appropriate exceptions are being raised for errors.
- New `OptionsManager` class that handles user options for a session.
- Sorted out some issues in the architecture of the `DebugContext` class.
- A `Session` is now automatically opened when used as a context manager. This can be disabled by setting the `auto_open` parameter of the constructor to False. Conversely, `ConnectHelper.session_with_chosen_probe()` no longer opens the session for you (but if used in a **with** statement, the session will still be opened).
- Removed deprecated parameters from `ConnectHelper.session_with_chosen_probe()`.
- `Session` is the sole notifier for target-related notifications.
- Added support for notifications on changes to user options. In this case, the `OptionsManager` is the notifier. For instance, to subscribe: `my_session.options.subscribe(my_cb, "auto_unlock")`.
- Removed `root_target` attribute from `Target`.

Testing

- Added a basic unit test for CMSIS-Pack loading. However, it is currently disabled because it fails when run under Travis-CI.
- New unit test for the notification API.
- New unit test for the `OptionsManager` class.

0.20.1

Fixes

- Fixed an exception caused by the target auto-detection for STLink probes under Windows.

Page 6 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.