For Windows users, you will need VC runtime to run the binary. You can download it from Microsoft.
Or else, you can install it from source.
# install libusb for your platform
# macOS
> brew install libusb
# Ubuntu
> sudo apt install libusb-1.0-0-dev
# install wchisp
> cargo install wchisp --git https://github.com/ch32-rs/wchisp
# or use
> cargo install wchisp --force
Prebuilt Binaries
Prebuilt binaries are available on the Github Actions Page.
Click the newest runs at Github Actions Page and download the binary from “Artifacts” section.
Note for Windows
If you are using Windows, you need to install the WinUSB driver for your device.
See Zadig.
NOTE: This is not compatible with the Official WCH driver you installed with IDE.
Note for Linux
If you are using Linux, you need to set the udev rules for your device.
# /etc/udev/rules.d/50-wchisp.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="4348", ATTRS{idProduct}=="55e0", MODE="0666"
# or replace MODE="0666" with GROUP="plugdev" or something else
The CH32V00x series DOES NOT have a USB ISP interface; it can only be accessed via UART. Use -s or --serial command-line option to specify serial transport, and -p or --port option to specify COM/TTY port.
Also note that ISP bootloader entry cannot be controlled via external pin state at reset. Instead, user application code must instruct device to enter the bootloader via setting FLASH_STATR.MODE flag and performing a software reset (see PFIC_CFGR).
Tested On
This tool should work on most WCH MCU chips. But I haven’t tested it on any other chips.
wchisp - WCH ISP Tool in Rust
Command-line implementation of the WCHISPTool in Rust, by the ch32-rs team.
This tool is a work in progress.
Installing
The prebuilt binaries are available on the Nightly release page.
For Windows users, you will need VC runtime to run the binary. You can download it from Microsoft.
Or else, you can install it from source.
Prebuilt Binaries
Prebuilt binaries are available on the Github Actions Page. Click the newest runs at Github Actions Page and download the binary from “Artifacts” section.
Note for Windows
If you are using Windows, you need to install the WinUSB driver for your device. See Zadig.
NOTE: This is not compatible with the Official WCH driver you installed with IDE.
Note for Linux
If you are using Linux, you need to set the udev rules for your device.
Arch Linux
Arch Linux users can install wchisp or wchisp-git via the AUR.
or
Usage
CH32V00x Notes
The CH32V00x series DOES NOT have a USB ISP interface; it can only be accessed via UART. Use
-s
or--serial
command-line option to specify serial transport, and-p
or--port
option to specify COM/TTY port.Also note that ISP bootloader entry cannot be controlled via external pin state at reset. Instead, user application code must instruct device to enter the bootloader via setting
FLASH_STATR.MODE
flag and performing a software reset (seePFIC_CFGR
).Tested On
This tool should work on most WCH MCU chips. But I haven’t tested it on any other chips.
TODOs
wchisp probe
wchisp info
wchisp config
wchisp config set SRAM_CODE_MODE=1 ...
-d
to select device index)wchisp -d 0 info
Related Works (Many Thanks!)
Contribution
This project is under active development. If you have any suggestions or bug reports, please open an issue.
If it works for your devices, please open a pull request to modify this README page.
It it doesn’t, please open an issue. Better provide the following information: