PyOpenocdClient
PyOpenocdClient is a Python library for controlling OpenOCD software tool.
It allows to send Tcl commands from Python programs to OpenOCD — for instance commands like halt execution of the program, view data in memory, place breakpoints, single-step, ...
In addition, a console utility is included with PyOpenocdClient that can be used to send Tcl commands to OpenOCD from non-Python software, such as shell scripts.
Main features of PyOpenocdClient:
-
you can send any Tcl command to OpenOCD and obtain its result;
-
shorcuts for quick use of most common OpenOCD commands are provided;
-
command failures are detected (and reported as Python exceptions by default);
-
the code is fully covered via unit tests;
-
integration testing regularly runs against multiple versions of OpenOCD;
-
the code is multiplatform and portable — it does not have any dependencies except for the Python's standard library;
-
the library is fully open-source under a permissive license (MIT license).
Quick instructions
Install PyOpenocdClient package using Pip:
$ python3 -m pip install PyOpenocdClient
Basic usage from Python:
from py_openocd_client import PyOpenocdClient
with PyOpenocdClient(host="localhost", port=6666) as ocd:
ocd.reset_halt()
ocd.cmd("load_image path/to/program.elf")
ocd.resume()
# ...
Basic usage from a command-line or shell scripts:
$ openocd_cmd --host 127.0.0.1 --port 6666 version
Open On-Chip Debugger 0.12.0+dev-02634-g390b9d731 (2026-08-29-14:15)
$ openocd_cmd --host 127.0.0.1 --port 6666 "reset halt ; reg pc"
pc (/32): 0x08001234
Documentation
For full documentation, please visit: https://pyopenocdclient.readthedocs.io/en/latest/
Metadata
Release files for PyOpenocdClient 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyopenocdclient-0.2.0.tar.gz | 16.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyopenocdclient-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.3 kB
Release files / pyopenocdclient-0.2.0.tar.gz
| Download URL | pyopenocdclient-0.2.0.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b738f57d0e2ac3f404caf7ad39f67a4d2598484d00343222cae9611bb3cbeeda
|
|
BLAKE2b-256 checksum How to use checksums |
acf7d461302ad54c54fdc826ce9f41a7e82e648e0e87d88086a2ef001812032e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / pyopenocdclient-0.2.0-py3-none-any.whl
| Download URL | pyopenocdclient-0.2.0-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59583a576634dea433abf0c06877e7fccbf8d6091612379a5f0c0610f067b59f
|
|
BLAKE2b-256 checksum How to use checksums |
6742acc4151b8baee5d0f28a0b21ed7a40d831717f4bbed326d7838de371d67f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|