A standalone implementation of the Tethered Serial Interface (TSI) in Python.
Project description
PyUARTSI
A standalone implementation of the Tethered Serial Interface (TSI) in Python.
Installation
Install from PyPI
pip install barstools.uartsi
Install from repo
git clone https://github.com/ucb-bar/pyuartsi.git
cd ./pyuartsi/
pip install .
Usage
usage: python -m barstools.uartsi [-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 barstools.uartsi --port COM20 --elf <program.elf> --load --hart0_msip
python -m barstools.uartsi --port /dev/ttyxx --init_read 0x02000000
python -m barstools.uartsi --port /dev/ttyxx --init_write 0x80000000:0xdeadbeef --init_read 0x80000000
python -m barstools.uartsi --port /dev/ttyxx --elf <program.elf> --load --hart0_msip --fesvr
python -m barstools.uartsi --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
Built Distribution
File details
Details for the file barstools_uartsi-2024.8.14.tar.gz
.
File metadata
- Download URL: barstools_uartsi-2024.8.14.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e01b0ca31759b3f887f324d7923bc11608c9b3bbba1cb3b83f5ac20bc7173ba |
|
MD5 | 1acb47215858d751079345d9018824c3 |
|
BLAKE2b-256 | 428028b057c29388d3262d3f2f64d77d06b5d219d03c7c720188dbd46a364bd4 |
File details
Details for the file barstools.uartsi-2024.8.14-py3-none-any.whl
.
File metadata
- Download URL: barstools.uartsi-2024.8.14-py3-none-any.whl
- Upload date:
- Size: 2.1 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 | db208778a4d236ad51432b71f972cb74a2153f8d0b423c87f08ab1ae844f2482 |
|
MD5 | 724285c40ddbdf2621f8ae496166660b |
|
BLAKE2b-256 | 31dc59997fd28312b18d776d2247c6193f63475e2887b438bb0bc8ebfb6608aa |