A flexible configuration and remote contol tool for openocd.
Project description
oocd-tool
A flexible configuration and remote contol tool for openocd.
This tool was made to create a wireless development environment for a project. It's made public since a lack of easy solutions and it will be developed futher if there are a interrest in this tool.
Features
- Controls openocd remotely through gRPC. Makes wireless debugging/programming possible with a raspberry pi.
- Runs openocd as background process then debugging. (Windows compatible)
- Runs gdb/openocd in pipe mode.
- Capable of log streaming from remote openocd host.
Usage
Define custom sections as needed using python syntax for configparser.ExtendedInterpolation A default .oocd-tool directory with example files is create in the home dir (at first run). Can be overwritten on command line with a '-c'.
config.xx: keys defines config files. They can be specified with full path or none, they are prefix with the default configuration directory if no path is given.
3 configuration files is available in the examples directory for each operation mode. (remote.cfg, pipe.cfg and spawn.cfg). The active default configuration is should be placed in ~/.oocd-tool/oocd-tool.cfg with the rest of the configuration files.
Command line syntax:
oocd-tool [-c oocd-tool.cfg] <action> /some_path/elffile
Use '-d' for a dry run. Prints only commands.
Command line syntax gRPC daemon, see examples folder for configuration:
oocd-rpcd -c oocd-rpcd.cfg
Tags avalible:
@TMPFILE@ creates a temporary file. May only be used in pairs once, and not in default section.
@CONFIG@ equales to default config path or path from '-c' on command line
@FCPU@ value from '--fcpu' parameter
@ELFFILE@ elf filename
Modes:
gdb Runs gdb standalone / openocd remotely.
openocd Runs openocd standalone, localy or remotely.
gdb_openocd Spawns openocd in backgroup (used for Windows support).
Installation:
git clone git@github.com:jasa/oocd-tool.git
cd oocd-tool
python -m build
pip install dist/oocd-tool-0.0.3.tar.gz --user
Installation of RPC daemon on a remote pi4.
# Tested on: Pi OS - Debian Buster
sudo apt install openocd
sudo adduser ocd
su - ocd
git clone https://github.com/jasa/oocd-tool.git
cd oocd-tool
python -m build
pip install dist/oocd_tool-0.1.0.tar.gz
cp examples/oocd-rpcd.service to /etc/systemd/system
mkdir ~/.oocd-tool
cp examples/openocd.cfg ~/.oocd-tool
# install your programming device (st-link, cmsis-dap, ...) and copy needed file to `/etc/udev.rules.d`
# edit config file ~/.oocd-tool/openocd.cfg as needed
# exit as 'ocd' user
sudo usermod -g <udev group> # if needed
sudo udevadm control --reload-rules
sudo udevadm trigger
sudo systemctl daemon-reload
sudo systemctl start oocd-rpcd
sudo systemctl enable oocd-rpcd
Status
- Tested superficial in Windows with openocd 0.11.0, gdb 10.3
- A ELF is mandatory on command line, even if it's not used. Needs to be fixed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oocd-tool-0.1.0.tar.gz.
File metadata
- Download URL: oocd-tool-0.1.0.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
314c943d700d0f4ffccd38ff1789568ee24957da305d64e45c84b8a6eac9aab6
|
|
| MD5 |
dcaa248e510fc20db4f498ed5f33103f
|
|
| BLAKE2b-256 |
60f34f1394e735a5157e0739bd815b1076ba7f5f0e2360bdee61951a662b09cb
|
File details
Details for the file oocd_tool-0.1.0-py3-none-any.whl.
File metadata
- Download URL: oocd_tool-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f66292bfd79de949f1f5113e1e0b75aa46bcf437d7f98e16cb7821288bd0a784
|
|
| MD5 |
f6e0c941fd460cb54d3dfa10c583f6a7
|
|
| BLAKE2b-256 |
64e3f5f0569a321c19a9cadf7434cf1c7773be3657439ac11858c1a6205414e0
|