https://github.com/ucb-bar/pyuartsi
A standalone implementation of the Tethered Serial Interface (TSI) in Python.
https://github.com/ucb-bar/pyuartsi
Last synced: about 2 months ago
JSON representation
A standalone implementation of the Tethered Serial Interface (TSI) in Python.
- Host: GitHub
- URL: https://github.com/ucb-bar/pyuartsi
- Owner: ucb-bar
- Created: 2024-08-15T02:57:41.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-13T22:44:50.000Z (6 months ago)
- Last Synced: 2025-03-27T00:22:33.124Z (2 months ago)
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 5
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PyUARTSI
A standalone implementation of the Tethered Serial Interface (TSI) in Python.
## Installation
Install from PyPI
```bash
pip install pyuartsi
```Install from repo
```bash
git clone https://github.com/ucb-bar/pyuartsi.git
cd ./pyuartsi/
pip install .
```## Usage
```bash
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 --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 --load --hart0_msip --fesvr
python -m pyuartsi --port /dev/ttyxx --baudrate 921600 --elf --load --selfcheck --hart0_msip --fesvr --cflush_addr 0x02010200Python 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](https://github.com/ucb-bar/testchipip/tree/master/uart_tsi)
Rust implementation [TSI](https://github.com/ucb-bar/tsi)