[pyocd.io] [Docs] [Slack] [Mailing list] [CI results]
See the wiki news page for all recent news. |
pyOCD is an open source Python based tool and package for programming and debugging Arm Cortex-M microcontrollers with a wide range of debug probes. It is fully cross-platform, with support for Linux, macOS, Windows, and FreeBSD.
A command line tool is provided that covers most use cases, or you can make use of the Python API to facilitate custom target control. A common use for the Python API is to run and control CI tests.
Support for more than 70 popular MCUs is built-in. In addition, through the use of CMSIS Device Family Packs, nearly every Cortex-M device on the market is supported.
The pyocd
command line tool gives you total control over your device with these subcommands:
gdbserver
: GDB remote server allows you to debug using gdb via either the console or several GUI debugger options.load
: Program files of various formats into flash or RAM.erase
: Erase part or all of an MCU's flash memory.pack
: Manage CMSIS Device Family Packs that provide additional target device support.commander
: Interactive REPL control and inspection of the MCU.server
: Share a debug probe with a TCP/IP server.reset
: Hardware or software reset of a device.rtt
: Stream Segger RTT IO with any debug probe.list
: Show connected devices.
The API and tools provide these features:
- halt, step, resume control
- read/write memory
- read/write core registers
- set/remove hardware and software breakpoints
- set/remove watchpoints
- write to flash memory
- load binary, hex, or ELF files into flash
- reset control
- access CoreSight DP and APs
- SWO and SWV
- and more!
Configuration and customization is supported through config files, user scripts, and the Python API.
- Python 3.6.0 or later.†
- macOS, Linux, Windows 7 or newer, or FreeBSD
- A recent version of libusb. See libusb installation for details.
- Microcontroller with an Arm Cortex-M CPU
- Supported debug probe
- CMSIS-DAP v1 (HID) or v2 (WinUSB), including:
- Atmel EDBG/nEDBG
- Atmel-ICE
- Cypress KitProg3 or MiniProg4
- DAPLink based debug probe, either on-board or standalone
- Keil ULINKplus
- NXP LPC-LinkII
- NXP MCU-Link
- PE Micro Cyclone and Multilink
- Raspberry Pi Picoprobe
- SEGGER J-Link
- STLinkV2 or STLinkV3, either on-board or the standalone versions
- CMSIS-DAP v1 (HID) or v2 (WinUSB), including:
† Version 0.29 is the last version to support Python 2.
PyOCD is beta quality.
The Python API is considered stable for version 0.x, but will be changed in version 1.0.
< 8000 div class="markdown-heading" dir="auto">