Skip to main content

uspiflash

A generator of tiny, single-file C libraries that detect SPI flash chips and report their capabilities, built from the spiflash database, for early-boot and embedded code: Zephyr, MicroPython, the LiteX BIOS, bare-metal Cortex-M and RISC-V (down to WCH's CH32V003), and Linux spidev.

Every byte the library puts on a device is measured, across a wide range of GCC, LLVM and SDCC versions.

Install

pip install uspiflash          # or: uv tool install uspiflash

Or, as a Debian package, from the signed apt repository at https://mith.ro/uspiflash/. There is one per suite (bookworm, trixie, forky and sid), and the package is Architecture: all, so it installs on any architecture. python3-uspiflash depends on python3-spiflash, which is not in this repository, so add spiflash's own apt repository first, then uspiflash's. Put your suite's name in place of trixie below (Raspberry Pi OS uses Debian's codenames):

sudo install -d -m0755 /etc/apt/keyrings
curl -fsSL https://mith.ro/spiflash/spiflash.gpg | sudo tee /etc/apt/keyrings/spiflash.gpg > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/spiflash.gpg] https://mith.ro/spiflash/trixie/ ./" \
  | sudo tee /etc/apt/sources.list.d/spiflash.list

spiflash's repository's signing key is B528 6C61 A99A 9E6A 5B8A 8E5B 6B2D 7683 DE01 081D (gpg --show-keys /etc/apt/keyrings/spiflash.gpg shows it).

curl -fsSL https://mith.ro/uspiflash/uspiflash.gpg | sudo tee /etc/apt/keyrings/uspiflash.gpg > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/uspiflash.gpg] https://mith.ro/uspiflash/trixie/ ./" \
  | sudo tee /etc/apt/sources.list.d/uspiflash.list

uspiflash's repository's signing key is 2E19 5D58 706D 44E8 5704 1566 04FA D17C 2A3B 8344 (gpg --show-keys /etc/apt/keyrings/uspiflash.gpg shows it).

sudo apt update
sudo apt install python3-uspiflash      # provides the uspiflash command

Work in progress: the design is in docs/superpowers/specs/.

License

Apache-2.0; see LICENSE.

Metadata

Release files for uspiflash 0.0.post45

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uspiflash 0.0.post45
File Size Uploaded Provenance Actions
uspiflash-0.0.post45.tar.gz 131.7 kB With provenance Details for uspiflash-0.0.post45.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for uspiflash 0.0.post45
File Interpreter ABI Platform Actions
uspiflash-0.0.post45-py3-none-any.whl Python 3 none any Details for uspiflash-0.0.post45-py3-none-any.whl

Total release size: 159.9 kB

Release files / uspiflash-0.0.post45.tar.gz

Download URL uspiflash-0.0.post45.tar.gz
Size 131.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cbf8625879fa64b628fc9974b903eb472ff00a8c67d93dec7de22ef1a04719b4
BLAKE2b-256 checksum
How to use checksums
b565436304a488b7726551a05d18f1cc2e7cc17243fd85226a295c2c25f69ce5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / uspiflash-0.0.post45-py3-none-any.whl

Download URL uspiflash-0.0.post45-py3-none-any.whl
Size 28.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf36d3f43d566d72c63263cf73e146441328c3596532ea75827fa7830a14c77f
BLAKE2b-256 checksum
How to use checksums
2add2376181d7ebc877607e24a2cba6ddff6fc4e48dc0302a7b3ac1d0bc8de52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Security for uspiflash 0.0.post45

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for uspiflash-0.0.post45.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page