Skip to main content

nt_flash

A command-line tool for flashing firmware to the Expert Sleepers Disting NT Eurorack module.

Installation

pip install nt-flash

This installs the nt_flash command and all dependencies (including NXP SPSDK).

Requirements

  • Python 3.9 or later
  • USB access to the Disting NT in bootloader mode

Usage

# Flash from a local package
nt_flash manufacturing_package.zip

# Flash from a URL
nt_flash --url https://example.com/firmware.zip

# Show help
nt_flash --help

Options

Option Description
-u, --url URL Download package from URL
-t, --timeout SECS Device detection timeout (default: 60)
-v, --verbose Enable verbose output
--version Show version
-h, --help Show help

Exit Codes

Code Meaning
0 Success
1 Invalid arguments
2 Package error (invalid or missing files)
3 Download failed
4 Device not found (timeout)
5 Flash error

Progress Output

The tool outputs structured progress messages for integration with other tools:

EXTRACTING
PACKAGE_INFO 1.2.3
WAITING_BOOTLOADER
DEVICE_DETECTED sdp
UPLOADING_FLASHLOADER 100%
DEVICE_DETECTED mboot
CONFIGURING_MEMORY
ERASING 100%
WRITING 100%
RESETTING
COMPLETE

Firmware Package Format

The tool expects a ZIP file (manufacturing_package.zip) containing:

  • MANIFEST.json - Package metadata
  • *flashloader*.bin - NXP flashloader binary
  • disting_NT.bin - Disting NT firmware binary

How It Works

  1. Extracts flashloader and firmware from the package
  2. Waits for device in SDP bootloader mode (USB 0x1FC9:0x0135)
  3. Uploads flashloader to RAM and executes it
  4. Waits for flashloader to enumerate (USB 0x15A2:0x0073)
  5. Configures FlexSPI NOR memory
  6. Erases flash region
  7. Writes firmware at offset 0x1000
  8. Resets device to boot new firmware

This is a wrapper around NXP SPSDK CLI tools (blhost and sdphost), using separate subprocess calls for each operation to ensure clean USB state.

Why Subprocess?

The SPSDK Python API has USB HID buffer state issues when multiple operations share the same connection. Using subprocess calls to the CLI tools (which each run in a fresh process) ensures reliable operation. See SPSDK issue discussion for details.

License

MIT License

Metadata

Release files for nt-flash 1.0.2

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

Source distribution (sdist)

Source distribution for nt-flash 1.0.2
File Size Uploaded Provenance Actions
nt_flash-1.0.2.tar.gz 5.6 kB Without provenance Details for nt_flash-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nt-flash 1.0.2
File Interpreter ABI Platform Actions
nt_flash-1.0.2-py3-none-any.whl Python 3 none any Details for nt_flash-1.0.2-py3-none-any.whl

Total release size: 11.6 kB

Release files / nt_flash-1.0.2.tar.gz

Download URL nt_flash-1.0.2.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8282a56917ceae474e989cd9ca723b9aaec5cdb94f1984e5d6ce1605816f47ae
BLAKE2b-256 checksum
How to use checksums
5565630276afd6ffed4aa5ca74f9428811890c87c15de68695bfe0eb2a4f9eeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / nt_flash-1.0.2-py3-none-any.whl

Download URL nt_flash-1.0.2-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6138fb49d7503ff1f68db6ae213a1eec1f68d3a752eab9b4116e2bd95b631f94
BLAKE2b-256 checksum
How to use checksums
75beb20c76e8df3f6c3a128c5baeb868946d4fec5955243bff8c36a27d85277c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for nt-flash 1.0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files No provenance

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