Releases: pyocd/pyOCD
Releases · pyocd/pyOCD
v0.36.0
Improvements
- Allow FlashBuilder to work when program page size is larger than sector erase size (@BrianPugh)
- Very basic implementation to get a "connect" LED status display (@rgrr)
- Add Trace Funnel Coresight component (@rapgenic)
- Cortex-M CPU type detection improvements
- Debug sequences: support pname on DebugPort* sequences
Targets
- Add MAX32666FTHR board (@ozersa)
- Add STMicro STM32 H743 and H723 targets (@unsanded)
- nRF91 family improvements (@maxd-nordic)
- Add HDSC HC32F448 hc32a460xe and hc32a4a0xi. (@lennvn)
- Add airm2m air001 target (@kaidegit)
- Add airm2m air32f103 target (@HalfSweet)
- Add STMicro STM32H7B0 Target (@BrianPugh)
- Add NXP S32K344 target (@PetervdPerk-NXP)
- Add Realtek RTL8762C (@suphammer)
- Add some missing ST and NXP board IDs
- Fix HC32l130 32k+ flash error (@kaidegit)
- Fix HC32L13x size and enable double buffering (@kaidegit)
- Infineon PSoC6: remove unnecessary sleep during reset (@te-johan)
- Remove part number match for NXP MIMXRTxxxx series family
Fixes
- RTT: fix CB not found (@tdasika)
- CMSIS-DAP: Windows performance regression fix
- Debug sequences: fix assignment expressions.
- flash: fix some type errors, sort imports
- Removed extraneous space character in the default
cortex_m
target warning message (@BenjaminSoelberg) - Flash loader: fix missing import of RamRegion
- coresight: adiv5 discovery: increment invalid AP count on exception
- cortex-m: reset_halt: just warn about invalid T-bit, don't automatically fix
- commands: reset: fall back to reset via probe if context has no selected core
- Only create one session to access options when there's no current session, to reduce debug log message output.
Miscellaneous
- docs: fix example (@liux-pro)
- Update copyright section for Maxim (@ozersa)
- probe: cmsis-dap: use test binary from builtin board data for v2.1 based board info
- Use annotations future in several source files
- Update built-in targets and commands documentation
❤️ Special thanks to new contributors!
- @BenjaminSoelberg
- @BrianPugh
- @HalfSweet
- @kaidegit
- @liux-pro
- @PetervdPerk-NXP
- @rapgenic
- @suphammer
- @tdasika
- @unsanded
Full Changelog: v0.35.1...v0.36.0
v0.35.1
Fixes
- debug sequences: support [uU] suffix on integer literals
- commands:
show accessible-pins
: fix function call, print GPIO pins - commands:
show locked
: fix misspelled "target" - coresight: dap: revert API change to add DebugPort param to DPConnector constructor (in particular, this broke the NXP SPSDK tool's pyOCD support)
- manifest: add sequences.lark
- code quality: do not use bare exception handler (thanks @jsiverskog)
Full Changelog: v0.35.0...v0.35.1
v0.35.0
Important note
With this release, Python 3.6 is no longer supported. The minimum Python version is now 3.7.0.
Features
- cmsis-packs: debug sequence support; see the documentation for details
- rtt: add RTT support to gdbserver via the addition of an
rtt
command (thanks @samueldewan) - rtt: add logging function to rtt sub-command (thanks @zjli-2019)
- coresight: cortex-m: 'primary_core' option
- subcommands: Python tracebacks are no longer printed unless debug logging is enabled (the
debug.traceback
option is disabled by default) - object graph nodes have names now, accessible with the
.node_name
attribute- board and SoC nodes have default names of "board" and "soc"
- CPUs will have a default (uniquified) name of the CPU type, or a custom name specified in a DFP
- these names are visible in some of the commands such as
show cores
orshow graph
, and can be used in commands such ascore
(to select the core that commands apply to)
- memory map: memory regions can have subregions; this is used for flash memory regions to explicitly support multiple sector sizes and/or flash algorithms
- target: added generic
sw_system
andsw_core
reset types (aliased assystem
andcore
, withTarget.ResetType.SW_SYSTEM
andTarget.ResetType.SW_CORE
enums in the API), corresponding to the existingsysresetreq
andvectreset
reset types - target:
.supported_reset_types
property returns a list of allowed reset type enums - flash: add
--no-reset
option to prevent resetting of device after programming (thanks @nordicjm) - flash: memory regions are now created when a DFP specifies an algorithm without also defining a corresponding memory region, as long as that algorithm is marked as default
- core:
cache.enable_memory
andcache.enable_register
session options to control the memory and register cache used by the gdb server - commands: add
show sequences
command - commands: add
reset-type
value to show and set current reset type and view available reset types - commands: new
sleep
command - commands: add
pins
andaccessible-pins
values - api: debug probe pins API
Targets
- target: add YTMicro device support (thanks @majorlin)
- target: builtin support for LPC55S16 (thanks @imi415)
- target name: fix DISCO-H745I target name to stm32h745xihx (thanks @mbrossard)
- family: add nRF91 family that works with the
nrf9160_xxaa
target from the NordicSemiconductor.nRF_DeviceFamilyPack DFP (not a builtin target) (thanks @maxd-nordic) - family: update Nordic nRF52 approtect handling (thanks @maxd-nordic)
- family: no longer use the builtin NXP LPC55xx family class for DFP-based LPC55xx targets, since there is a conflict with the debug sequences contained within those DFPs
Changes
- packs: expanded folder support, tilde expanding, exception and other small improvements
- rtt: refactor RTT (thanks @samueldewan)
- commander: use logger for session open errors
- semihosting: use POSIX stdio fd numbers (thanks @rgrr)
- semihosting: transparent io (thanks @rgrr)
- semihosting: SYS_GET_CMDLINE, feature bits, tilde expansion, type fixes
- cortex-m: only clear DEMCR and invoke stop_core_debug delegate if resuming core on disconnect
- coresight: component ids: STM 0x962 with archid=0, CS-400 Replicator 0x909, CS-400 HTM, more
- coresight: cortex_m: improve debug log for inability to resume core
- memory map: memory region attributes can be changed after a region is created, making it easier to modify regions in a user script
- flash: many improvements and fixes to how flash memory regions are created for DFP based targets
- flash: place algo at end of RAM with stack going all the way to RAM start
- commands:
show map
: print memory map subregions - commands:
show cores
: print cores in a table with the core name - commands:
show graph
: print node names - commands:
core
: print core names, allow selecting core by name - dependency: migrate away from deprecated pkg_resources to importlib
- dependency: bump minimum cmsis-pack-manager version to 0.5.2
- dependencies: bump pylink-square to minimum v1.0 (thanks @avi-jois)
- setup.cfg: add Python 3.11 to classifiers
Fixes
- probe: accept WCH-Link as DAPv1 (thanks @eugene-bright)
- probe: cmsis-dap: add "CMSIS_DAP" to known device strings
- probe: stlink: cache board IDs to improve connect time
- semihosting: ensure directories exist before opening a file (thanks @Hoohaha)
- RTOS: Catch TransferErrors during kernel state checks (thanks @imi415)
- flash: catch exceptions while fetching state (thanks @maxd-nordic)
- coresight: discovery: continue after an AP probe failure occurs
- core: soc_target: options to control memory and register cache enablement
- trace: minor trace logging improvements
- commands: reinit: set exec context attrs to defaults
Other
- udev: add rule for STM32F103C8T6_CMSIS-DAP_SWOC CMSIS-DAP probe (thanks @kholia)
- workflows: basic_test: add python 3.11 to matrix
- workflow: basic_test_skipped: add matching matrix to basic_test so the job names are the same
- test: unit: test_semihosting: comment out tests using telnetlib
- docs: enhance API examples (thanks @rgrr)
- docs: added Open-CMSIS-Pack support documentation
- docs: updated targets and commands reference
- docs: remove seriously outdated how_to_build.md
- type annotation fixes and additions
New Contributors
- @avi-jois made their first contribution in #1503
- @eugene-bright made their first contribution in #1399
- @imi415 made their first contribution in #1435
- @majorlin made their first contribution in #1255
- @maxd-nordic made their first contribution in #1505
- @nordicjm made their first contribution in #1492
- @samueldewan made their first contribution in #1443
- @fkjagodzinski made their first contribution in #1476
- @rgrr made their first contribution in #1517
- @kholia made their first contribution in #1509
- @zjli-2019 made their first contribution in #1527
Full Changelog: v0.34.3...v0.35.0
v0.34.3
Fixes
- STLink: Fix 1-byte transfers (for real this time… 😅) (thanks @fkjagodzinski!)
Targets
- Maxim MAX32660: align second double buffer to size of one sector (thanks @ttt-t3r!)
Full Changelog: v0.34.2...v0.34.3
v0.34.2
Fixes
- Cortex-M: Fix emulated reset and halt.
- NXP LPC55xx: Correct family regex for using family class with LPC55xx CMSIS-Packs.
- NXP LPC800, LPC824: Do not set SP and PC in
reset_and_halt()
. (Thanks @Hoohaha) - CMSIS-Pack: Use PDSC-relative path for resource files, fixes #1460 (Thanks @imi415)
- Options: Correct name of
enable_multicore_debug
in option definitions. (Thanks @YixingShen) - Commands: fix typo in
rmwatch
. (Thanks @kkitayam) - CMSIS-DAP: Fix index error processing reply to DapJtagSequence with read_tdo=0. (Thanks @kkitayam)
- CoreSight DAP: Fix JTAG initialization sequence for CMSIS-DAP. (Thanks @kkitayam)
- Nordic nRF52: Ensure core discovery after mass erase on locked targets. (Thanks @brathis)
Full Changelog: v0.34.1...v0.34.2
v0.34.1
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
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 errorreset
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 forfind
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
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
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. Thedebug.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
andwreg' improvements.
-poption to force lookup as peripheral register.
regwill print any number of registers. Add
rrand
wr` 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 thepersist
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 causedDBGMCU
(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 ofTarget
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
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