NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #4400 most downloaded on PyPI
Cortex-M debugger for Python
Last release 2 months ago
21 Jul 2026
Ships unpredictably
gaps range from 9 days to 1.7 years
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
93 releases · first in 2013
Support flash algorithms with an explicitly defined RAM range outside the target memory map
Full Changelog: v0.45.0...v0.45.1
With this release, support for Python 3.14 is enabled and Python 3.8 is no longer supported. The minimum Python version is now 3.9.0.
With this release, support for Python 3.14 is enabled and Python 3.8 is no longer supported. The minimum Python version is now 3.9.0.
FlashEraseSetup and FlashProgramSetup sequences used by flashinfo based regionsRunPythonScript function for running Python scripts from debug sequencesTraceCapture and TraceFlush sequence hooks, along with __traceclockin and __traceclockout debug access variablestelnet_* session option names with stdio_*, reflecting that standard I/O is not limited to Telnet transporttelnet_* option names as aliasesn_srst reset-type mappingFull Changelog: v0.44.1...v0.45.0
One column per quarter.
Improve robustness of load subcommand post reset handling
Full Changelog: v0.44.0...v0.44.1
Use default debug sequences as defined in the Open-CMSIS-Pack specification
ResetHardwareAssert and ResetHardwareDeassertFlashInit, FlashUninit, FlashEraseChip, FlashEraseSector, FlashEraseDone, FlashProgramPage, FlashProgramDone, and DebugCodeMemRemaprun subcommand:
telnet to serverif, while)__protocol and __connectionFull Changelog: v0.43.1...v0.44.0
RTT: Fix control block detection via _SEGGER_RTT symbol on single-core devices when the control block configuration is not specified.
_SEGGER_RTT symbol on single-core devices when the control block configuration is not specified.Full Changelog: v0.43.0...v0.43.1
Add support for SEGGER's RTT and SystemView (configured via *.cbuild-run.yml )
run subcommand:
*.cbuild-run.yml)sdtout, and all user input from the stdin will be sent to the target*.SVDat file) can be directly opened using SEGGER's SystemView analysis toolpage_buffers instead of begin_data in flash algorithmsbegin_data from the algorithm templateCortex-M7 (AT610) and Cortex-M7 with FPU (AT611) Software Developer Errata Notice
513195: Lock Status Indication incorrectly reads as one
page_sizefilename property access when using extracted packs (@timll-mchp)control-block not found when the first character of the control-block ID was not present in the read memory (@HaoYDai)develop branchFull Changelog: v0.42.0...v0.43.0
Introduce a new run subcommand capable of running targets until a time limit or EOT (suited for CI/CD workflows)
run subcommand:
run subcommand capable of running targets until a time limit or EOT (suited for CI/CD workflows)console, telnet, file and offNote: Currently only output is supported
*.cbuild-run.yml processing if the target_override option is setconnect mode configurationpre-reset and post-reset options in load-setup configuration*.cbuild-run.yml filepre-reset and post-reset type in load subcommand.. in file paths (@xoriath)Full Changelog: v0.41.0...v0.42.0
Fix RTOS support for Zephyr (thread detection)
Full Changelog: v0.40.0...v0.41.0
CI: remove deprecated GitHub Actions command ( @CubikingChill )
commander interfacejtag_sequence returning no data (@NorbertHipfl)six package (@a-detiste)Full Changelog: v0.39.0...v0.40.0
CMSIS-Toolbox Run and Debug Management integration:
*.cbuild-run.yml file*.cbuild-run.yml file*.cbuild-run.yml file path is invalid*.cbuild-run.yml file are missingFull Changelog: v0.38.0...v0.39.0
Add CoreSight AP specific CSW handling for AHB-AP, AXI-AP, APB-AP
cbuild-run targetsFull Changelog: https://github.com/pyocd/pyOCD/compare/v0.37.0...v0.38.0
update upload-artifact following deprecation
With this release, Python 3.7 is no longer supported. The minimum Python version is now 3.8.0.
--cbuild-run option across subcommandscbuild-runcbuild-runcbuild-runqC command handling (@tlyu)apid handlingpname based filteringcbuild-run supportFull Changelog: https://github.com/pyocd/pyOCD/compare/v0.36.0...v0.37.0
Allow FlashBuilder to work when program page size is larger than sector erase size (@BrianPugh)
cortex_m target warning message (@BenjaminSoelberg)❤️ Special thanks to new contributors!
Full Changelog: https://github.com/pyocd/pyOCD/compare/v0.35.1...v0.36.0
debug sequences: support [uU] suffix on integer literals
show accessible-pins: fix function call, print GPIO pinsshow locked: fix misspelled "target"Full Changelog: https://github.com/pyocd/pyOCD/compare/v0.35.0...v0.35.1
dependency: migrate away from deprecated pkg_resources to importlib
With this release, Python 3.6 is no longer supported. The minimum Python version is now 3.7.0.
rtt command (thanks @samueldewan)debug.traceback option is disabled by default).node_name attribute
show cores or show graph, and can be used in commands such as core (to select the core that commands apply to)sw_system and sw_core reset types (aliased as system and core, with Target.ResetType.SW_SYSTEM and Target.ResetType.SW_CORE enums in the API), corresponding to the existing sysresetreq and vectreset reset types.supported_reset_types property returns a list of allowed reset type enums--no-reset option to prevent resetting of device after programming (thanks @nordicjm)cache.enable_memory and cache.enable_register session options to control the memory and register cache used by the gdb servershow sequences commandreset-type value to show and set current reset type and view available reset typessleep commandpins and accessible-pins valuesnrf9160_xxaa target from the NordicSemiconductor.nRF_DeviceFamilyPack DFP (not a builtin target) (thanks @maxd-nordic)show map: print memory map subregionsshow cores: print cores in a table with the core nameshow graph: print node namescore: print core names, allow selecting core by nameFull Changelog: https://github.com/pyocd/pyOCD/compare/v0.34.3...v0.35.0
STLink: Fix 1-byte transfers (for real this time… 😅) (thanks @fkjagodzinski!)
Full Changelog: https://github.com/pyocd/pyOCD/compare/v0.34.2...v0.34.3
Cortex-M: Fix emulated reset and halt.
reset_and_halt(). (Thanks @Hoohaha)enable_multicore_debug in option definitions. (Thanks @YixingShen)rmwatch. (Thanks @kkitayam)Full Changelog: https://github.com/pyocd/pyOCD/compare/v0.34.1...v0.34.2
Options: Fix session option parsing for multi-type options (Thanks @svenuniku)
load subcommand: Correctly handle valid paths containing '@' characters. (Issue #1424.)qXfer commands..gitarchival.txt template to support the built-in git archive support in setuptools_scm.Full Changelog: https://github.com/pyocd/pyOCD/compare/v0.34.0...v0.34.1
Probes: Vega VT-LinkII probe support (Thanks @Entropy98)
rmwatch optionally accepts type and size.max32670 target. (Thanks @ozersa)m467hjhae target. (Thanks @ychsu-tf)hc32m120x6 target. (Thanks @lennvn)GenericMemAPTarget issues.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)set option command.-n arg for find command.MemoryLoader to Python namespace.pemicro extra, e.g. pip install pyocd[pemicro]. This resolves crashes in PowerShell on exit of pyocd.Full Changelog: https://github.com/pyocd/pyOCD/compare/v0.33.1...v0.34.0
Zephyr RTOS: Fix reading thread name and update debug symbol names. (Thanks @MaureenHelm)
JTAG_GET_BOARD_IDENTIFIERS command.Full Changelog: https://github.com/pyocd/pyOCD/compare/v0.33.0...v0.33.1
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
rtt subcommand. This subcommand streams stdio from/to the target. It works with all debug probe types, not only J-Link. (Thanks @mikisama, @ccattuto)--color command line argument controls this feature. Also simplified the log output formatting so it is easier to read.-x/--execute argument to run commands from a file. Multiple command files can be run and mixed with -c commands.-i/--interactive to stay in REPL after running commands from either a file or command line.@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.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. The debug.status_fault_retry_timeout session option controls the timeout; set it to 0 to disable this experimental feature.flushprobe command that ensures all outstanding transfers on the probe have been completed.reg output so it is properly redirected when called as a gdbserver monitor command.reg and wreg' improvements. -poption to force lookup as peripheral register.regwill print any number of registers. Addrrandwr` aliases.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.keep_unwritten session option to false.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.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.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.disconnect command is used so that the persist option is honoured (disconnect previously would never cause the gdbserver to stop). (Thanks @claymation)exit monitor command that will shut down all gdbservers and quit pyocd.CSW.DBGSWEN for CSSoC-400 APB-AP to resolve an issue that caused DBGMCU (and other) peripherals to be inaccessible on certain STM32 devices, and likely similar issues on other devices.CoreTarget class, a superclass of Target instances for CPU cores.set_clock() works with float parameters for all probe drivers.is_reset_asserted() method.automated_test.py supports remote probes in its -b argument.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: https://github.com/pyocd/pyOCD/compare/v0.32.3...v0.33.0
J-Link: Fix SWO that was completely broken due to an invalid attribute name.
collections.Iterable.Full Changelog: https://github.com/pyocd/pyOCD/compare/v0.32.2...v0.32.3
Fix STM32l0x6 erase. (thanks @michieldwitte!)
Full Changelog: https://github.com/pyocd/pyOCD/compare/v0.32.1...v0.32.2
Explicit Python 3.10 support and 3.10 wheels.
jlink.non_interactive option.lpc55s36. (thanks @Hoohaha!)jlink.device is set.Full Changelog: https://github.com/pyocd/pyOCD/compare/v0.32.0...v0.32.1
FlashLoader class renamed to MemoryLoader to reflect RAM loading support. The old name is still available as an alias, but is deprecated.
load subcommand is an alias of flash, and is now the default name for that subcommand.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.--core and --halt arguments.cortex_m target type, the Cortex-M architectural memory map is supplied instead of having an empty memory map.cortex-m is now equivalent to cortex_m.DBGMCU.APB1FZR2 and DBGMCU.APB2FZR registers.& operator, would cause a hang.load subcommand: tildes in file name paths are resolved.--allow-remote argument.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! ❤️
The original options will still work but are deprecated.
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.-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.PYOCD_PROJECT_DIR environment variable. (#1172 @g-arjones)m2354kjfae) built-in target. (#1132 #1167 @ychsu-tf)lpc5526) (#1139 @stephendpmurphy)lpc55s36) and MKE17Z256xxx7 (ke17z) targets. (#1174 @Hoohaha)nrf52833) target.set_reset_catch() when there was an invalid vector table address. (#1175 @Hoohaha)pyocd.subcommands package.A big thanks to all contributors! ❤️
Picoprobe: fixed exception when libusb isn't installed, regardless of whether a Picoprobe is connected. #1126
Remove misleading warning about missing pywinusb on Windows. Only affected new installations that didn't already have pywinusb installed.
Picoprobe: Fix exception that affected any probe if a UID was specified with no connected Picoprobes. #1116
pyocd.probe.cmsis_dap_probe. #1114setup.py.Removed the long since deprecated pyocd-flashtool and pyocd-tool commands. pyocd-gdbserver has been held back from the chopping block for another time…
This release of pyOCD makes some big changes!
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.rp2040_core0 or rp2040_core1 target type. The rp2040 target type is an alias for rp2040_core0. Both cores cannot currently be debugged simultaneously.lpc845. (Thanks @Hoohaha!)hc32f160xa and hc32f160xc. (Thanks @lennvn!)hc32f460xc and hc32f460xe to HC32F460 series, and changed hc32m423 to hc32m423xa. (Thanks @lennvn!)GDBDebugContextFacade: Fix misspelled warning() method.wire_protocol property converter handling of a None value.DP_SELECT register at the J-Link probe plugin level since it is now handled in the higher DP layer.pyocd list.FlashDevice struct in .FLM files.CMSISDAPProbe: trace logging.Flash: trace logger for flash algo operations.--project alias for -j / --dir.swd_sequence() and jtag_sequence() APIs.probeserver_test.py functional test.TestTimeout.no_timeout so it doesn't fail on certain systems._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, pl…
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.
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)--allow-remote argument to enable remote access to the probe server, as it now defaults to serve local-only, like the other TCP servers.reset command accepts optional reset type.show aps command to list DAP Access Ports.DebugPort.connect() can be called multiple times and it will do the right thing.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.init() to use a single read and restore of the CSW register.probeserver command by wrapping the DebugProbe instance in the shared probe proxy.wreg on peripheral registers.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.DebugPort.init() to connect().adi.v5.max_invalid_ap_count session option.scripts/generate_flash_algo.py tool, copied from the FlashAlgo project and simplified.adding_new_targets.md.gdb_script.py to gdb_test_script.py.test/output/ directory.ElfReaderContext test to debug_context_test.py.commander_test.py.Semihosting: fix Python 3 string/bytes issues and unit test problems.
Updated the flash algorithm for NXP i.MX RT1021xxxxx. (Thanks @Hoohaha.)
quit/exit command. (Thanks @Hoohaha.)monitor command.hello"my"friend is parsed as hellomyfriend. Backslash-escapes are also supported, but within quotes only quote and backslash characters can be escaped.k (kill) command.Resolved a regression where passing an ELF to Commander with the --elf argument caused an exception. #969
--elf argument caused an exception. #969_Important note: Support for Python 2 is deprecated and planned to be dropped from an upcoming release. Existing releases of pyocd will, of course, co…
Important note: Support for Python 2 is deprecated and planned to be dropped from an upcoming release. Existing releases of pyocd will, of course, continue to work with Python 2. If this is a major issue for you moving forward, please create a new issue describing your concerns.
--probe-server to cause the debug probe server to be started simultaneous with the gdbserver. For allows, for instance, to connect a pyocd commander to an already-running gdbserver.~/.pyocd_history. The PYOCD_HISTORY environment variable will override this if set.PYOCD_HISTORY_LENGTH environment variable or commander.history_length option allow you to change this. Setting either one to -1 will enable an infinite history (but beware history file size).mimxrt1024, mimxrt1060, and mimxrt1064). (Thanks @Hoohaha)m487jidae. (Thanks @ychsu-tf)reg command accepts all or the name of a register group in addition to register names.where command prints the offset from the base address of the symbol.show register-groups prints a list of the named groups of core registers.probeserver command to control the debug probe server.reset.halt_timeout session option controls the timeout waiting for the core to recover from reset and halt.cortex_m default target).pyocd.yaml) does not have a yaml dictionary at its root. This helps users identify the cause of an otherwise obscure error message.rtos.enable can be used to completely disable RTOS support, which is enabled by default. rtos.name can be set to the name of an RTOS plugin in order to limit RTOS awareness to that one RTOS (which can make startup faster).cache.read_code_from_elf session option controls whether pyocd will read code from an ELF that is provided to it rather than read from the target (an optimisation that is enabled by default when an ELF is provided).cmsis_dap.deferred_transfers session options controls whether the CMSIS-DAP layer will used deferred transfers. There is generally no reason to disable this, especially since it greatly affects performance, but it may help is special cases.cpu.step.instruction.timeout can be used to enable a timeout when performing instruction stepping. By default the timeout is disabled.scan_all_aps session option in several places.extensions property that is a list of enums from pyocd.coresight.core_ids.CortexMExtensions.core_registers property which is a pyocd.core.core_registers.CoreRegisterIndex object. This object gives you multiple ways to list and find core registers, such as by name, index, or group.CoreSightTarget so there is an SoCTarget superclass that implements the architecture-independent SoC-level features. Moved CoreSightTarget under pyocd.coresight.MemoryAccessError exception only raised by the memory cache with TransferFaultError.Session class now tracks instances of the gdbservers and probeserver.Target.step() API.test/data.skip_test session option. This would be set in per-probe options in the config file if you need to skip a probe during testing.automated_test.py gains --list-tests, --include-tests, and --exclude-tests command line arguments.test_pyocd_tool.sh script.Fixed a regression in flash memory region creation from CMSIS-Packs that could result in an AssertionError being raised.
AssertionError being raised.NXP Kinetis targets: Fix additional exceptions raised if no cores were found, for instance if the device is locked. #909 (Thanks @Hoohaha)
cy8c64xx_cmX_full_flash targets. #920 (Thanks @bohdan-tymkiv)JLink: fix regression related to locking. #911
General: Resolved a deprecation warning for the Thread.isAlive() method from the Python threading module.
core command.--core argument to run the gdbserver for a subset of cores.cortex_m target type being selected is not logged if the target type was explicitly set.--probe as an alias for --uid on the command line.--frequency argument accepts floating point values, and allows "Hz" (case-insensitive) to follow the value in addition to the previously supported metric scale suffixes. For example, --frequency=2.2MHz now works as expected.set clock command accepts the same values as the --frequency argument.jlink.device option. (By default, "Cortex-M4" is used. This doesn't cause any problems except a warning in the J-Link log because pyOCD uses its own target discovery rather than the J-Link's.)GeneralMemAPTarget class was added that provides a target object for MEM-APs without a connected core. This handles the case where a MEM-AP provides access to either the system memory bus or an isolated memory bus, independent of MEM-APs for the core(s). (Thanks @bohdan-tymkiv and Cypress.)concurrency_test.py functional test.gdb_test.py on Python 3. (Thanks @bartek-w.)Thread.isAlive() method from the Python threading module.Fixed invalid reference to DFSR_PMU constant from CortexM.
DFSR_PMU constant from CortexM.read_memory_block32() size parameter in ElfReaderContext. (Thanks @mbrossard!)Experimental SEGGER J-Link probe support.
pylink-square package, which will find the driver if installed in the standard location on all three supported OSes.jlink.power user option to control the J-Link's power output. Defaults to enabled.reset subcommand.pack subcommand option --find prints an "Installed" column showing whether the containing CMSIS-Pack is already installed and the target is available.pack subcommand options --find and --install match the given part number pattern anywhere within the part number (contains match).st alias for status.show locked prints whether the target is locked (for NXP Kinetis and Nordic nRF52 devices).show graph print the object model graph.reset.hold_time and reset.post_delay user options to fine tune hardware reset timings.logging.loggers yaml key in the config file is ignored instead of reporting an error while attempting to configure logging.status only reports the core status now.reg only shows peripheral register fields if the -f option is passed.wreg -r option to perform a post-write read-back and print of the peripheral register value. The read-back is no longer performed automatically.six in coresight_target.py.FileProgrammer import issue for user scripts that appeared in certain cases.CortexM._map_from_vector_catch_mask().Breakpoint repr() implementation.wdp, wap, and wreg commands.DebugPort that caused certain faults and timeouts to not be cleared in the DP.KeyError exception that would be raised by the RTX5 RTOS support when generating the thread description if a thread has an invalid state.DebugPort init uses a call sequence.DPConnector class.SWJSequenceSender classCoreSightDiscovery class hierarchy. This allows the init sequence to be modified by an ADI version-specific subclass. These changes are preparatory work for ADIv6 support.CoreSightTarget.post_connect_hook() method that can be overridden by builtin targets without having to modify the init sequence.CortexM and CortexM_v8M classes gained an architecture property that is a CoreArchitecture.ARMv6M enum of the Arm Cortex-M architecture: ARMv6M, ARMv7M, ARMv8M_BASE, ARMv8M_MAIN. Correspondingly, the arch attribute was removed from the classes.CortexM_v8M.user_script.md reference to old MemoryMap.get_region_by_name() method that was replaced with get_first_matching_region().User scripts are run earlier, from the Session constructor. This allows user scripts to add new target classes.
Session constructor. This allows user scripts to add new target classes.compare command for comparing memory with a binary file.pyocd json --features. This is intended to allow IDEs to query for supported features and the set of available user options without having to make decisions based solely on the pyOCD version.k32l2b3 target. (Thanks @jhqian.)mimxrt1010 and mimxrt1015 targets.
(Thanks @jhqian.)m263kiaae target. (Thanks @OpenNuvoton.)hc32l110, hc32f003, hc32f005, hc32l136, hc32l130, hc32f030, hc32l196, hc32l190, hc32f196, hc32f190, hc32l072, hc32l073, hc32f072. (Thanks @hdscmcu.)erase command will perform a mass erase if no arguments are passed.DAP_PACKET_SIZE larger than the bulk packet size. (Thanks @vllogic.)BreakpointManager.allow_no_cores option.FlashRegion via the flm parameter.FileProgrammer functional test now tests ELF files.svd_data.zip is built by setup.py.setup.py can be run from directories other than the repo root. (Thanks @jsiverskog.)Fixed regression where programming an ELF file failed, caused by missing import. (Thanks @DurandA!)
These sequences transition between SWD and JTAG by going through a dormant mode. By default, pyOCD will first attempt the deprecated SWJ sequences, th…
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.FileProgrammer that appeared when attempting to load ELF files. (#782 and others. Thanks @samkearney!)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.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.link attribute of DebugPort to probe.MemoryMap region search methods.FlashRegion.is_erased() to is_data_erased() which better reflects that it operates on passed-in data.Target to be enums.Target that were unused.Target.get_halt_reason() method.FlashReaderContext to ElfReaderContext.GraphNode methods.MemoryCache and RegisterCache were moved from pyocd.debug.cache to their own modules in a new subpackage pyocd.cache.GDBServerPacketIOThread to its own module.FileProgrammer and FlashEraser to their own modules under pyocd.flash.MemoryMap methods.Fix some minor deprecation warnings reported by Python 3.8.
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.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.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.show option in commander.Nothing published for this version
Fixed regression with Cypress PSoC6 targets (#680) and merged in cumulative PSoC6 updates from Cypress.
Removed deprecated parameters from ConnectHelper.session_with_chosen_probe().
pyocd list command gained some arguments to filter the output.FlashBuilder class related to filling gaps in pages with no data to program.Flash.program_phrase().CortexM.available_breakpoint_count property.OptionsManager class that handles user options for a session.DebugContext class.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).ConnectHelper.session_with_chosen_probe().Session is the sole notifier for target-related notifications.OptionsManager is the notifier. For instance, to subscribe: my_session.options.subscribe(my_cb, "auto_unlock").root_target attribute from Target.OptionsManager class.Fixed an exception caused by the target auto-detection for STLink probes under Windows.
pyOCD now supports managed CMSIS-Packs. A new pack subcommand has been added to the pyocd tool that lets you install packs to add target support with
pack subcommand has been added to the pyocd tool that lets you install packs to add target support with a single command. See #610 and the new target support documentation for details.show peripherals and read or write peripheral registers by name.debug.log_flm_info user option to log debug messages with details of .FLM flash algorithms.show map command prints both sector and page sizes.get_probe_with_id() APIs on debug probes.savemem command inits the flash algo when accessing flash regions with is_powered_on_boot flash set to false.pyocd erase, correctly deal with sector and page sizes being different.Session instance is accessible via Session.get_current().basic_test.py for flash regions with small number of sectors.flash_loader_test.py fixes.Support for different flash erase sector and program page sizes (#452).
Note: there are still issues with most of the new v8-M targets.
pyocd was added to the commander Python expression evaluation namespace, so that all of pyOCD's Python API can be accessed.smart_flash and keep_unwritten user options to better control the flash programming logic.Flash subclass to handle different erase/program sizes were updated to use the new support for that feature.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.pyocd-gdbserver (#570).--no-init option for commander.vector_catch option. If the option was not set, an exception was raised.GDBServer.stop() so it no longer uninits the board.disasm command works while the target is running.--help-options argument no longer fails for user options that have multiple allowed types, such as pack.LOG_DAP functionality in pyocd.coresight.ap.FileProgrammer trying to raise the undefined ArgumentError exception for errors. It now raises the standard ValueError.FileProgrammer checked for file errors, including file not found (#590).FileProgrammer used programmatically would not default to sector erase.selected_core property setter on CoreSightTarget.init_board parameter to Session.open() to control whether the board (and therefore target) are initialized. Used to implement the commander --no-init option.STLinkException from the STLink probe code; now using standard pyOCD exceptions.smart_flash and keep_unwritten parameters to FileProgrammer and FlashLoader.AccessPort methods are automatically serialized via a mutex.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.)MEM_AP to temporarily change HPROT or HNONSEC. The AP is locked while the context manager is live.CortexM_v8M subclass for v8-M cores.gdb_test.py requiring 32-bit Python 2.7 on Windows.speed_test.py.speed_test.py limits the size it will read or write during testing to 1 MB.basic_test.py to support nonequal erase/program sizes.Added a setter for the CoreSightTarget.selected_core property. The select_core() method is now deprecated.
trace_start() delegate and user script method will be called by the SWV reader if the target is reset.FlashReaderContext class' usage of a removed intervaltree API. This problem would be triggered if you passed pyocd gdbserver an ELF file.NotImplementedError exceptions raised on Windows by the CMSIS-DAPv2 interface code.has_fpu attribute from the Target class. This attribute is only supported on CortexM now.is_float_register() returns true for both single and double precision float registers.CoreSightTarget.selected_core property. The select_core() method is now deprecated.format parameter of FileProgrammer.program() to file_format so it doesn't shadow the builtin function.GDBSocket into pyocd.utility.socket.ListenerSocket.pyocd.utility.py3_helpers module to pyocd.utility.compatibility.Flash_cortex_m class.Timeout class.GDBServer.GDBServer since these are now handled elsewhere.docs/ folder to all lower case.user_scripts.md and delegate method doc comments.test/ folder in the repo root.flash_loader_test.py tests hex file programming.speed_test.py tests cached memory accesses and records the ROM read speed.cortex_test.py reports test metrics.test_boards.yaml file in favour of the now-standard pyocd.yaml config file.blank_test.py.debug_context_test.py.pyOCD now supports user scripts, written in Python, that can extend, modify, and override default behaviour at multiple key points in the connection l
-j/--dir command line argument or project_dir user option. Any files used by pyOCD, such as config files, user scripts, or .FLM flash algos, will be searched for in the project directory if they are specified as a relative path.FlashRegion via the flm property. pyOCD will then load the flash algorithm for you. Very useful for user scripts.flash_algo property of FlashRegion to just algo and made it and flash_class settable. This is all to make it easy to set or modify the flash algo in user scripts and delegates.SESSION_OPTIONS.md documentation file to CONFIGURATION.md since it covers all configuration topics and not just a list of options.Addressed a case where the USB device product name could be returned as bytes by hidapi instead of a string.
to_str_safe() on Python 2 with non-ASCII characters.CmsisPack class.pyocd.target.pack.pack to pyocd.target.pack.cmsis_pack.Initial enablement of target support through CMSIS Device Family Packs. Pass the --pack argument to the pyocd tool, or set the pack session option in
--pack argument to the pyocd tool, or set the pack session option in a config file. Any devices defined in the specified pack(s) become available as targets.pyocd erase subcommand.Target.ResetType enumeration.CortexM has default_reset_type and default_software_reset_type properties. Software reset is used by default, and the default software reset depends on whether the core is the primary or a secondary core.VECTRESET.FlashRegion object with the erased_byte_value attribute.pyocd.target.builtin.FlashLoader if no data was written to flash.Updated intervaltree dependency to version 3.0.2, which fixes a warning reported on Python 3 about a deprecated API.
CortexM uses the architecture and MVFR2 register to determine core features instead of the core type.intervaltree dependency to version 3.0.2, which fixes a warning reported on Python 3 about a deprecated API.read_core_register_raw() and write_core_register_raw() were accidentally renamed to the non-raw version, resulting in two methods with the same name. This happened to not cause problems when using the gdbserver.setup.py reads the README.md file, which fixes issues on systems that have an incompatible default system encoding.Init() with the operation to be performed (erase or program), and calling Uninit() then Init() again prior to performing a different operation. Unfortunately, this change affects flash programming performance, slowing it down by approximately 5 kB/s. This performance degradation will be addressed soon.cortex_test.py to cover both the raw and non-raw versions of the read/write register APIs.Fixed serving on localhost only in the semihosting telnet server. The gdbserver would still serve localhost only by default (unless --allow-remote was
--allow-remote was set), but a bug was introduced in version 0.14.0 that caused the telnet server to always allow remote access.Pinned intervaltree version to 2.1.0. This is a work around for an issue in the newly released version 3.0.0 where it fails to install under Python 2.
Corrected documentation and readme to reference combined pyocd tool.
pyocd tool.chip_erase and trust_crc parameters in FlashLoader. This also corrects the behaviour of the --erase and --trust-crc command line arguments to pyocd flash. The most noticeable effect of the bug was that the sector erase option was not honoured.FileProgrammer where they needed to be opened in text mode.The three pyOCD command line tools have been merged into a single pyocd tool with subcommands. The legacy tools are now deprecated and will print a wa…
pyocd tool with subcommands. The legacy tools are now deprecated and will print a warning about this when run. They will be removed in the 1.0 release.pyocd.flash.loader module that provides some high level flash related classes: FileProgrammer, FlashEraser, and FlashLoader.GDBServer class are now handled as session options and are documented as such.writedp and writeap commands in pyOCD commander (previously pyocd-tool).flash_loader_test.py functional test that performs bare bones testing of the classes in pyocd.flash.loader.FileProgrammer.Your coding agent can read these notes before it upgrades. Set up the MCP server →