Rust CLI for Riden RD60xx power supplies: firmware flashing, calibration, RTC sync, and memory-preset import/export.
Cross-platform tool for flashing firmware on Riden power supply units.
Originally derived from tjko/riden-flashtool. Calibration workflow inspired by simeonmiteff/cal-riden-psu and fdi.sk/posts/riden-cal.
RD6006, RD6006P, RD6006W, RD6012, RD6012P, RD6018, RD6024, RD6030.
The tool keeps a device table with model-specific voltage/current limits and register decimal scaling so calibration and memory preset JSON files use real units instead of raw register values.
- Firmware flashing with bootloader auto-switch.
- Calibration register export/import as JSON.
- Interactive calibration register editor.
- Guided
calibrate --wizardflow for target and display calibration. - Automatic iterative DISPLAY-only calibration via
calibrate --auto-display-voltageandcalibrate --auto-display-current(no external instrument required, uses the trusted DAC as reference). - Custom wizard points via
--voltage-min,--voltage-max,--current-min,--current-max. - RTC sync with
sync-time. - Memory preset export/import for M0..M9.
- Register-map and raw register dumping tools.
Ready-to-use binaries for Windows, Linux, and macOS are available in the Releases section.
- 🪟 Windows (x64):
riden-flashtool-windows-amd64.exe.zip - 🐧 Linux (x64):
riden-flashtool-linux-amd64.zip - 🐧 Linux (ARM64):
riden-flashtool-linux-arm64.zip - 🍎 macOS (Intel):
riden-flashtool-darwin-amd64.zip - 🍎 macOS (Apple Silicon):
riden-flashtool-darwin-arm64.zip
Each release includes SHA-256 checksums for verification. Simply download, extract, and run!
If you run a release binary downloaded from GitHub Releases, macOS may block it because it is not signed with an Apple developer certificate.
xattr -d com.apple.quarantine ./riden-flashtoolIf needed, also allow it once from System Settings → Privacy & Security.
- Install Rust toolchain
- Build from source:
cargo build --release
# Binary appears at: ./target/release/riden-flashtool# List serial ports
./riden-flashtool list
# Identify the connected PSU
./riden-flashtool info /dev/tty.usbserial-XXXX
# Flash firmware
./riden-flashtool flash /dev/tty.usbserial-XXXX firmware.binlist List candidate serial ports
info Identify the connected device
flash Flash firmware
calibrate Interactive calibration (register editor, --wizard, --auto-display-voltage, --auto-display-current)
cal-export Export calibration registers to JSON
cal-import Restore calibration registers from JSON
sync-time Set device RTC from host clock
memory-export Export M0..M9 memory presets to JSON
memory-import Restore M0..M9 memory presets from JSON
dump-regs Read a range of holding registers
register-map Print the documented Riden Modbus register map
Always export a backup before modifying calibration registers:
./riden-flashtool cal-export /dev/tty.usbserial-XXXX --file ./backups/Restore a saved calibration:
./riden-flashtool cal-import /dev/tty.usbserial-XXXX calibration.jsonFor the full calibration guide — wizard flow, automatic DISPLAY calibration, register descriptions, and formulas — see docs/calibration.md.
Export all memory presets:
./riden-flashtool memory-export /dev/tty.usbserial-XXXX --file presets.json
./riden-flashtool memory-export /dev/tty.usbserial-XXXX --file ./presets/Restore them later:
./riden-flashtool memory-import /dev/tty.usbserial-XXXX presets.json --yesThe JSON file stores V, I, OVP, and OCP in real units plus the source
model id so cross-device restores are explicit.
./riden-flashtool sync-time /dev/tty.usbserial-XXXXThe tool reads RTC registers 48..53, writes host time, then verifies the result.
./riden-flashtool register-mapThis prints the documented Riden holding-register map along with the internal variant table used by the tool.
Flash a firmware file (the tool auto-switches the device into bootloader mode if needed):
./riden-flashtool flash /dev/tty.usbserial-XXXX firmware.bin./riden-flashtool flash /dev/tty.usbserial-XXXX firmware.bin --force- No warranty or support provided for forced operations
- Use at your own risk - you may render your device unusable
- Only for advanced users who understand the consequences
Safer alternatives:
- Wait for official support for your device model
- Contact the developer to request support for new models
- Use only firmware specifically designed for your exact device model
Serial port: /dev/ttyUSB0 (115200bps)
Firmware size: 109888 bytes
Check if device in bootloader... No
Found device: RD6006 (60062) v1.40
Rebooting to bootloader...
Device info (bootloader):
Model: RD6006 (60062)
Firmware: v1.40
S/N: 000xxxxx
Updating firmware...b'OK'
Firmware update complete.If device fails to boot after flashing:
- Manual bootloader entry: Press/hold
ENTERwhile powering on unit - Re-run flashtool with firmware file
Override the default 115200 baud rate:
./riden-flashtool --speed 9600 list
./riden-flashtool --speed 9600 info /dev/tty.usbserial-XXXX
./riden-flashtool --speed 9600 flash /dev/tty.usbserial-XXXX firmware.binDevice not responding:
- Verify "Interface" setting is USB in PSU menu
- Connect directly to computer (avoid USB hubs)
- On Linux, ensure serial port permissions:
sudo usermod -aG dialout $USER - Use
/dev/tty.usbserial-...on macOS rather than/dev/cu....
Calibration not persistent:
- Check that register 54 write succeeded (commit magic
0x1501) - Use
--verboseto see raw Modbus traffic for debugging
Calibration taking too long:
- The tool now flushes and reopens the port automatically between interactive prompts to prevent buffer stale issues
Failed firmware flashing:
- Try again in bootloader mode (press/hold ENTER while powering on)
MIT. See LICENSE.txt.