Skip to content

v0.19.0

Choose a tag to compare

@flit flit released this 07 Apr 22:18
58e34ba

New features

  • Support for different flash erase sector and program page sizes (#452).
  • Initial v8-M support, with known issues.
  • New commander commands to run the gdbserver from within commander, to view and modify user options, to change the MEM-AP used for memory transfers, and to view and modify the current HPROT/HNONSEC for the selected AP.

Boards and targets

Note: there are still issues with most of the new v8-M targets.

  • NXP LPC55S69
  • Arm Musca-A1
  • Arm Musca-B1

Changes

  • pyOCD checks that at least one CPU was found and if not, reports a more understandable error.
  • The core number is included in the log message indicating a core was discovered.
  • pyocd was added to the commander Python expression evaluation namespace, so that all of pyOCD's Python API can be accessed.
  • Major cleanup of log messages related to libusb and debug probes.
  • The warning about no libusb is only logged once per process.
  • pyOCD clears all sticky DP error flags when a protocol error occurs.
  • If pyOCD sees a timeout error on transfers, it will issue a DP abort to stop the erroneous transaction.
  • Flash programming raises exceptions when the flash algorithm returns errors.
  • Added smart_flash and keep_unwritten user options to better control the flash programming logic.
  • Builtin targets that used a custom Flash subclass to handle different erase/program sizes were updated to use the new support for that feature.
  • Transfer errors that occur while reading ROM table entries are trapped, and the associated AP is ignored.
  • The commander uses a selectable MEM-AP for all memory transfers.
  • Configuring the TPIU for SWO is delayed until the TPIU.set_swo_clock() method is called. This is required due to a change in the v8-M TPIU that requires the trace clock to be active before accessing certain registers.

Fixes

  • The NXP LPC-LinkII debug probe is recognized properly.
  • Worked around apparent libusb issue in Windows where STLink probes would intermittently not be visible (#575).
  • Corrected handling of error responses from STLink probes (#581). This also fixes problems with the latest STLink firmware version (V2J33M25).
  • Fixed a problem introduced recently where probes running the old "mbed CMSIS-DAP" firmware was not recognized (#588).
  • Fixed CMSIS-Pack targets not working with pyocd-gdbserver (#570).
  • Fixed --no-init option for commander.
  • Fixed the default value for the gdbserver's vector_catch option. If the option was not set, an exception was raised.
  • Corrected GDBServer.stop() so it no longer uninits the board.
  • Commander disasm command works while the target is running.
  • The --help-options argument no longer fails for user options that have multiple allowed types, such as pack.
  • Fixed LOG_DAP functionality in pyocd.coresight.ap.
  • Updated pyyaml requirement to >= 5.1 (#582). The entire 4.1 release series that pyOCD was pinned to turned out to be buggy (though it didn't seem to affect pyOCD's usage).
  • Fixed FileProgrammer trying to raise the undefined ArgumentError exception for errors. It now raises the standard ValueError.
  • Fixed a number of issues with how FileProgrammer checked for file errors, including file not found (#590).
  • Fixed default names for memory regions.
  • Fixed a problem where FileProgrammer used programmatically would not default to sector erase.
  • Access permissions are set on memory regions created for Pack targets.
  • Fixed the selected_core property setter on CoreSightTarget.

Python API

  • Added optional init_board parameter to Session.open() to control whether the board (and therefore target) are initialized. Used to implement the commander --no-init option.
  • Removed STLinkException from the STLink probe code; now using standard pyOCD exceptions.
  • Added page and phrase sizes and program and erase weight attributes to flash memory regions.
  • Added smart_flash and keep_unwritten parameters to FileProgrammer and FlashLoader.
  • AccessPort methods are automatically serialized via a mutex.
  • Changing the HPROT and HNONSEC values used for MEM-AP transfers is supported.
  • MEM_AP attempts to detect the supported HPROT and HNONSEC bits in CSW.
  • AHB_AP detects whether the MSTRTYP bit is supported in CSW. (Only the M3/M4 AHB-AP supports this bit.)
  • Added context manager methods to MEM_AP to temporarily change HPROT or HNONSEC. The AP is locked while the context manager is live.
  • Moved the CoreSight components list to a separate source file.
  • New CortexM_v8M subclass for v8-M cores.

Documentation

  • Updated contributing guidelines and removed mention of the contributor license agreement that no longer needs to be signed.
  • Added readme to udev folder with detailed information.
  • The udev section in the main readme was simplified.
  • Link to GNU Arm Embedded toolchain in a couple places.
  • Updated the architecture diagram.
  • Note about gdb_test.py requiring 32-bit Python 2.7 on Windows.

Testing

  • Testing both 8- and 32-bit transfers in speed_test.py.
  • speed_test.py limits the size it will read or write during testing to 1 MB.
  • Rewrote the simple flash erase/program test in basic_test.py to support nonequal erase/program sizes.

Known issues

  • The LPC-LinkII probe may not work correctly under Windows using pywinusb.
  • All new v8-M targets have certain issues with flash programming or other operations.