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-2024.8.14.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

pyuartsi-2024.8.14-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyuartsi-2024.8.14.tar.gz
Algorithm Hash digest
SHA256 d513e0c10b2fcaefc96954d05b9911cadc1d57e97a4125ef4999362bdf952d43
MD5 75c2979181b5a910f1fe5b2fed8a69ac
BLAKE2b-256 f811299c49d04d4e6ebef3eff98454f13e93cd237d2cc466d2e660912976206a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyuartsi-2024.8.14.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-2024.8.14-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pyuartsi-2024.8.14-py3-none-any.whl
Algorithm Hash digest
SHA256 21a6b4c95ffdfc5cd2e207cce99cdff4e5ee2cc08c585376b78655b5a921ada2
MD5 ff4dfcfcc728a34e4be3125645080053
BLAKE2b-256 a4b5608c07c13e56d3ea9e2a5792ec3b6529d68723fef7398a2ccbcae3e9e77c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyuartsi-2024.8.14-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