Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 725 Bytes

README.md

File metadata and controls

32 lines (21 loc) · 725 Bytes

Python OpenOCD wrapper

This is a simple module for interfacing with openocd via TCL api.

Installation

pip install git+https://github.com/cdleonard/pyopenocd

Usage

>>> from openocd import OpenOcdTclRpc
>>> with OpenOcdTclRpc() as openocd:
...     print(openocd.run('expr 1 + 1'))
...
2

Command line

The openocd module is executable and can serve as a simple openocd remote from shell scripts:

$ openocd-remote run expr 1 + 2
3
$ openocd-remote run targets
...

Testing

pytest and tox are used for testing. Most useful tests require openocd to be running but they are skipped by default unless --openocd-running is passed on cmdline:

tox -- --openocd-running