WCHISPTool_CMD_CommandLineProgrammingToolInstruction (1)
WCHISPTool_CMD_CommandLineProgrammingToolInstruction (1)
cn
1. Introduction
1.1 Software function
WCHISPTool_CMD is a multi-platform command line tool for WCH MCU burning online, which supports
firmware download, verification and other operations for series MCU of WCH through USB or serial port. The
tool contains ISP library and sample programs for customized development of ISP tool.
Supported operating system: Windows x86/x64, Linux x64, macOS x64/arm64.
Supported chip model: CH54x/ CH55x/ CH56x/ CH641x/ CH643x/ CH57x/ CH58x/ CH59x/ CH32F10x/
CH3F20x/ CH32V00x/ CH32V10x/ CH32V20x/ CH32V30x/ CH32X03x/ CH32L10x.
1.2.2 Verify
USB mode:
sudo ./WCHISPTool_CMD -p /dev/ch37x -c Config.ini -o verify -f Target.hex
Serial port mode:
sudo ./WCHISPTool_CMD -p /dev/ttyISP0 -b 115200 -c Config.ini -o verify -f Target.hex
-b Communication baud rate of serial port 115200/230400/ Communication baud rate of serial port
-c The full path name of the configure file xxx.ini The full/relative path
Notes:
① All commands and parameters must appear in pairs in the format "-x xxx".
② Download or verify operation is required to pass in -p,-c,-o,-f instructions.
V3.60 1
WCHISPTool_CMD Command Line Programming Tool Instruction http://wch.cn
③ For the confirmation method of the USB ISP device or serial port node name corresponding to the - p
command, see subsections 3.1 and 4.1.
0 Execute successfully
5 No device enumerated
6 The specified chip type is not consistent with the actual chip type
13 Failed to download
14 Failed to verify
V3.60 2
WCHISPTool_CMD Command Line Programming Tool Instruction http://wch.cn
2. Windows Platform
For details, please refer to: https://www.wch.cn/downloads/WCHISPTool_Setup_exe.html install path \
WCHISPTool_XXX\Doc.
3. Linux Platform
3.1 Instruction
3.1.1 USB download mode
① Plug USB
Make sure MCU is in BOOT download mode, and PID of USB device is 0x55e0.
② Install USB device driver
Open the system terminal, enter the driver folder, and execute the "make install" command.
This operation is only required for the first download.
③ Determine USB ISP device name
Use the "ls" command to check whether the /dev/ch37x character device exists.
④ Execute download instruction
Execute according to the instruction format requirements of the tool, for example,
sudo ./WCHISPTool_CMD -p /dev/ch37x0 -c Config.ini -o program -f Target.hex
V3.60 3
WCHISPTool_CMD Command Line Programming Tool Instruction http://wch.cn
V3.60 4
WCHISPTool_CMD Command Line Programming Tool Instruction http://wch.cn
4. macOS Platform
4.1 Instruction
4.1.1 USB download mode
① Plug USB
Make sure MCU is in BOOT download mode, and PID of USB device is 0x55e0.
② Determine the location ID of the USB device in the macOS system. Find the device in the System
Report ->Hardware ->USB. The location ID in the USB device tree is shown in the following figure.
V3.60 5
WCHISPTool_CMD Command Line Programming Tool Instruction http://wch.cn
V3.60 6
WCHISPTool_CMD Command Line Programming Tool Instruction http://wch.cn
V3.60 7