With this tool, you don't need to enter ISP mode or buy another WCH-LinkE to flash the firmware of WCH-Link/E.
All known WCH-Link models should be supported, but tested with:
- WCH-Link
- WCH-LinkE r0 1v2
- WCH-LinkE r0 1v3
- Various thirdparty Link/LinkE.
git clone https://github.com/cjacker/wlink-iap
cd wlink-iap
make
sudo make install
A tool to flash WCH-Link/E firmware.
By cjacker <[email protected]>
Usage:
wlink-iap -f <firmware file>
Flash firmware.
Firmwares can be extracted from WCH-LinkUtility.
FIRMWARE_CH32V305.bin: WCH-LinkE(ch32v305)
FIRMWARE_CH549.bin: WCH-Link(ch549) RV
FIRMWARE_DAP_CH549.bin: WCH-Link(ch549) DAP
FIRMWARE_CH32V208.bin: WCH-LinkB(ch32v208)
FIRMWARE_CH32V203.bin: WCH-LinkS(ch32v203)
wlink-iap -i
Enter IAP mode.
wlink-iap -q
Quit IAP mode.
Plug WCH-Link/E to PC USB port and run:
./wlink-iap -f <firmware>
If you want to erase code flash and/or re-program the whole firmware (firmwares with filename contains 'APP_IAP'), you have to enter IAP mode first by hold the 'IAP' button down when powerup, or by wlink-iap -i.
This command is useful since official WCH-LinkE have a case and it's not convenient to hold the 'IAP' button down.
After IAP mode activated, pleaser refer to Update firmware of WCH-LinkE to update the whole firmware.
If WCH-LinkE was switched to IAP mode accidently, for example, user want to switch RV/DAP mode by 'Mode' button but hold 'IAP' button down, You can quit IAP mode by wlink-iap -q.
I put old and latest(up to this readme written) WCH-Link(CH549) and WCH-LinkE(CH32V) firmwares in this repo, for other unusual models, you can download and extract firmwares from WCH-LinkUtility.
ghidra: to analyse binaries of WCH-LinkUtility.
usbpcap: to sniff USB data under windows.
Contact wlink to implement this feature ASAP