Skip to main content

Flash firmware to Expert Sleepers Disting NT Eurorack module

Project description

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

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

nt_flash-1.0.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

nt_flash-1.0.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file nt_flash-1.0.2.tar.gz.

File metadata

  • Download URL: nt_flash-1.0.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for nt_flash-1.0.2.tar.gz
Algorithm Hash digest
SHA256 8282a56917ceae474e989cd9ca723b9aaec5cdb94f1984e5d6ce1605816f47ae
MD5 09335ae20a62529e60d3c79cf1ce687b
BLAKE2b-256 5565630276afd6ffed4aa5ca74f9428811890c87c15de68695bfe0eb2a4f9eeb

See more details on using hashes here.

File details

Details for the file nt_flash-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: nt_flash-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for nt_flash-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6138fb49d7503ff1f68db6ae213a1eec1f68d3a752eab9b4116e2bd95b631f94
MD5 4848b6378cd63f06fd49027d37e8b284
BLAKE2b-256 75beb20c76e8df3f6c3a128c5baeb868946d4fec5955243bff8c36a27d85277c

See more details on using hashes here.

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