Crates.io | nu-isp-cli |
lib.rs | nu-isp-cli |
version | 0.7.1 |
source | src |
created_at | 2020-06-14 14:01:29.407142 |
updated_at | 2021-11-28 12:17:42.82301 |
description | CLI tool for Nuvoton ISP_HID Bootloaders |
homepage | |
repository | https://github.com/elfmimi/nu-isp-rs |
max_upload_size | |
id | 253859 |
size | 50,831 |
Command line implementation of nu-isp flashing protocol over hid used by Nuvoton microcontrollers.
No special preparaiton needed. Install it, and it just works.
No special preparaiton needed. Install it, and it just works.
You'll need libusb. Depending on your distribution, you might need to sudo apt-get install libusb-1.0-0-dev pkg-config
.
If you'd like not to use sudo everytime, you'll need udev rules. With your board plugged in and in bootloader mode, use lsusb
to find its vendor-id and product-id, seen here as 0416:a316.
$ lsusb
...
Bus 001 Device 002: ID 0416:a316 Winbond Electronics Corp.
...
Then put them in the following format and save it to something like /etc/udev/rules.d/99-nuvoton-isp.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="0416", ATTR{idProduct}=="3f00", MODE="666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0416", ATTR{idProduct}=="a316", MODE="666"
Then replug your board and let it into bootloader mode again.
cargo install nu-isp-cli
$ nu-isp-cli
Nuvoton NuMicro ISP_HID Programming Tool [unofficial]
Version 0.7.1
Quick Reference:
nu-isp-cli <INPUT>
nu-isp-cli info
nu-isp-cli erase
nu-isp-cli flash <INPUT>
nu-isp-cli <VID:PID> info
nu-isp-cli <VID:PID> erase
nu-isp-cli <VID:PID> flash <INPUT>
nu-isp-cli --help
It will attempt to autodetect a device from list of known device-ids and using the first one available or you can specify vid and pid (before the subcommand) instead.
$ nu-isp-cli info
Printing info...
DEVICE NUC126LG4AE (PDID: 00C05204)
CONFIG FFFFFF7E:0001C000
Done.
It accepts binary files, elf files or ihex format text files for your convenience.
$ nu-isp-cli firmware.elf
It is tested with NUC123 , NUC126 , NUC029 and M032 series. and it should work with many other chips as long as their bootloaders are compatible. I'll happily add new chips to the list upon your report confirming its correct operation.