Skip to content
thorinsidePublic

About

Command-line tool for flashing disting NT firmware

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

23 Commits

Folders and files

Repository files navigation

NT Flash Tool

A unified command-line tool for flashing disting NT firmware. Replaces the need for Python/SPSDK installation.

Features

  • Flash from local ZIP firmware packages
  • Download and flash specific firmware versions
  • Download and flash the latest firmware
  • Cross-platform: Linux, macOS, Windows

Building

Prerequisites

Linux:

sudo apt-get install libudev-dev

macOS:

  • Xcode Command Line Tools: xcode-select --install

Windows (MinGW-w64):

Build

# Clone with submodules
git clone --recursive https://github.com/thorinside/nt-flash.git
cd nt-flash

# Build
make

# Or to build on Windows with MinGW
mingw32-make

The build produces a single binary: nt-flash (or nt-flash.exe on Windows).

Usage

Put disting NT in bootloader mode first

Before flashing, enable bootloader mode on the disting NT:

Menu > Misc > Enter bootloader mode...

Flash from local file

nt-flash /path/to/distingNT_1.12.0.zip

Download and flash specific version

nt-flash --version 1.12.0

Download and flash latest

nt-flash --latest

Download from custom URL

nt-flash --url https://example.com/firmware.zip

List available versions

nt-flash --list

Options

Option Description
-v, --verbose Show detailed output
-n, --dry-run Validate without flashing
-h, --help Show help

Firmware Package Format

The tool expects ZIP files containing:

distingNT_X.Y.Z.zip
├── MANIFEST.json
├── bootable_images/
│   ├── unsigned_MIMXRT1060_flashloader.bin
│   └── disting_NT.bin
└── ...

Official firmware packages from Expert Sleepers are fully supported.

How It Works

The flash process involves two stages:

  1. SDP Mode (USB 0x1FC9:0x0135): Upload flashloader to RAM and execute it
  2. Bootloader Mode (USB 0x15A2:0x0073): Configure flash, erase, write firmware, reset

Troubleshooting

Device not found

  • Ensure disting NT is in bootloader mode
  • On Linux, you may need udev rules. Create /etc/udev/rules.d/99-disting.rules:
    SUBSYSTEM=="usb", ATTR{idVendor}=="1fc9", ATTR{idProduct}=="0135", MODE="0666"
    SUBSYSTEM=="usb", ATTR{idVendor}=="15a2", ATTR{idProduct}=="0073", MODE="0666"
    
    Then: sudo udevadm control --reload-rules

Permission denied (Linux)

Run with sudo or set up udev rules as above.

License

This tool incorporates:

  • BLFWK from NXP (BSD-3-Clause)
  • miniz (Public Domain)
  • cJSON (MIT)

Credits

About

Command-line tool for flashing disting NT firmware

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages