v0.19.0
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.
pyocdwas 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_flashandkeep_unwrittenuser options to better control the flash programming logic. - Builtin targets that used a custom
Flashsubclass 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-initoption for commander. - Fixed the default value for the gdbserver's
vector_catchoption. If the option was not set, an exception was raised. - Corrected
GDBServer.stop()so it no longer uninits the board. - Commander
disasmcommand works while the target is running. - The
--help-optionsargument no longer fails for user options that have multiple allowed types, such aspack. - Fixed
LOG_DAPfunctionality inpyocd.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
FileProgrammertrying to raise the undefinedArgumentErrorexception for errors. It now raises the standardValueError. - Fixed a number of issues with how
FileProgrammerchecked for file errors, including file not found (#590). - Fixed default names for memory regions.
- Fixed a problem where
FileProgrammerused programmatically would not default to sector erase. - Access permissions are set on memory regions created for Pack targets.
- Fixed the
selected_coreproperty setter onCoreSightTarget.
Python API
- Added optional
init_boardparameter toSession.open()to control whether the board (and therefore target) are initialized. Used to implement the commander--no-initoption. - Removed
STLinkExceptionfrom 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_flashandkeep_unwrittenparameters toFileProgrammerandFlashLoader. AccessPortmethods are automatically serialized via a mutex.- Changing the HPROT and HNONSEC values used for MEM-AP transfers is supported.
MEM_APattempts to detect the supported HPROT and HNONSEC bits in CSW.AHB_APdetects whether the MSTRTYP bit is supported in CSW. (Only the M3/M4 AHB-AP supports this bit.)- Added context manager methods to
MEM_APto 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_v8Msubclass 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.pyrequiring 32-bit Python 2.7 on Windows.
Testing
- Testing both 8- and 32-bit transfers in
speed_test.py. speed_test.pylimits the size it will read or write during testing to 1 MB.- Rewrote the simple flash erase/program test in
basic_test.pyto 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.