Skip to main content

A standalone implementation of the Tethered Serial Interface (TSI) in Python.

Project description

PyUARTSI

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyuartsi-2026.1.20.tar.gz (2.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyuartsi-2026.1.20-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file pyuartsi-2026.1.20.tar.gz.

File metadata

  • Download URL: pyuartsi-2026.1.20.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyuartsi-2026.1.20.tar.gz
Algorithm Hash digest
SHA256 357f31b32fb59d8f7176479b65fa741feb7d50b1048e03a9441b5b33f6410b2a
MD5 a041dd0f0140f592e4694d348f6ebe62
BLAKE2b-256 dd5d2ff878a2da1373f22324810b9bbc1f123d72aa6031266e13e6c04bfeecb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyuartsi-2026.1.20.tar.gz:

Publisher: publish-to-pypi.yml on ucb-bar/pyuartsi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyuartsi-2026.1.20-py3-none-any.whl.

File metadata

  • Download URL: pyuartsi-2026.1.20-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyuartsi-2026.1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 2548c8601cef710682be47e4932407bbe3665a040cf743557f43acb410befef7
MD5 2b1b3de762bb43272403cd745e4ee291
BLAKE2b-256 d77541c532977221355cadc2f970e28905c2a3feaaac5cdaffb8e2288c679eac

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyuartsi-2026.1.20-py3-none-any.whl:

Publisher: publish-to-pypi.yml on ucb-bar/pyuartsi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page