Useful utilities for UC Berkeley Architecture Research (BAR) projects
Project description
PyUARTSI
A standalone implementation of the Tethered Serial Interface (TSI) in Python.
Installation
Install from PyPI
pip install pyuartsi
Install from repo
git clone https://github.com/ucb-bar/pyuartsi.git
cd ./pyuartsi/
pip install .
Usage
usage: python -m pyuartsi [-h] --port PORT [--baudrate BAUDRATE] [--init_write INIT_WRITE] [--init_read INIT_READ]
[--elf ELF] [--load] [--selfcheck] [--hart0_msip] [--fesvr] [--cflush_addr CFLUSH_ADDR]
examples: python -m pyuartsi --port COM20 --elf <program.elf> --load --hart0_msip
python -m pyuartsi --port /dev/ttyxx --init_read 0x02000000
python -m pyuartsi --port /dev/ttyxx --init_write 0x80000000:0xdeadbeef --init_read 0x80000000
python -m pyuartsi --port /dev/ttyxx --elf <program.elf> --load --hart0_msip --fesvr
python -m pyuartsi --port /dev/ttyxx --baudrate 921600 --elf <program.elf> --load --selfcheck --hart0_msip --fesvr --cflush_addr 0x02010200
Python port of UART-based TSI
options:
-h, --help show this help message and exit
--port PORT Serial port to connect to
--baudrate BAUDRATE Baudrate to use
--init_write INIT_WRITE
Write an initial value to an address
--init_read INIT_READ
Read an initial value from an address
--elf ELF Specify ELF file to load
--load Load the ELF file to target
--selfcheck Run self-check to verify the loaded ELF program
--hart0_msip Hart0 MSIP register
--fesvr Run the FESVR interface
--cflush_addr CFLUSH_ADDR
Cache control base address
Errata
-
The last
printf()
syscall on the DUT program will be printed twice for some reason. -
Always reset DUT before launching new program.
-
The Proxy FESVR currently only supports
_write()
and_exit()
syscall.
See Also
C++ implementation uart_tsi
Rust implementation TSI
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
barstools-0.0.1.tar.gz
(2.1 kB
view details)
Built Distribution
File details
Details for the file barstools-0.0.1.tar.gz
.
File metadata
- Download URL: barstools-0.0.1.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8484c927fe224b373a87108cbb8e8710a649fbbe3943d4c85bef8da73bbfc5a8 |
|
MD5 | b50d1bf28618d138df8ccc816b4d2ffb |
|
BLAKE2b-256 | 70a6a6b13064aae8ba18bd7102751f23b7aa0fb08cd0f055f8b0ebe61a807c52 |
File details
Details for the file barstools-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: barstools-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26d55dc92940d9d1a86db92b4a632c16aa0d08f186e85f17543ecd34c0df1aff |
|
MD5 | d554155e1d211a7d77df31e3cf36c1be |
|
BLAKE2b-256 | 29578c1ba2488d9af2be382561c222939895edfec0685fda489499f128b25cd0 |