This repository has been archived by the owner on Feb 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
wch-isp.1
118 lines (117 loc) · 2.39 KB
/
wch-isp.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
.TH WCH-ISP 1 wch-isp\-VERSION
.SH NAME
wch-isp \- firmware programmer for WCH microcontrollers
.SH SYNOPSIS
.B wch-isp
.RI [ OPTIONS ]
.I COMMAND
.RI [ ARG ...]
.P
.B wch-isp
.RB [ \-VDnpr ]
.RB [ \-d
.BR <uid> ]
.RB [ flash | write | verify | reset ]
.I FILE
.P
.B wch-isp
.RB [ \-VDnpr ]
.RB [ \-d
.BR <uid> ]
.RB [ erase | config | remove-wp ]
.P
.B wch-isp
.RB [ \-VDnpr ]
.RB [ \-d
.BR <uid> ]
.RB [ list ]
.SH DESCRIPTION
.B wch-isp
is an utility to write firmware into the flash of WCH microcontrollers, over USB.
By default the flash content is verified after writing.
.SH OPTIONS
.TP
.B \-d <uid>
Select the USB device that matches the uid. If nothing matches then uid is used as an index to select a device from the list.
.TP
.B \-n
Do not verify flash content after writing, verification is done by default.
.TP
.B \-p
Prints a progress bar during command operation.
.TP
.B \-r
Reset the microcontroller after the command is completed.
.TP
.B \-D
Enable debug information, print raw isp commands sent over USB.
.TP
.B \-V
Prints version information to stdout, then exits.
.SH COMMANDS
.TP
.B list
List the currently detected compatible USB devices.
.TP
.BI write " FILE"
Write
.I FILE
into flash, this will automatically erase sufficient flash sectors before writing to it.
.TP
.BI flash " FILE"
Write
.I FILE
into flash, same as write.
.TP
.BI verify " FILE"
Verify
.I FILE
content against the flash content.
.TP
.B reset
Reset the microcontroller and jump to code flash.
.TP
.B erase
Erase all the flash content.
.TP
.B config
Print a memory dump of the chip configuration.
.TP
.B remove-wp
Disable flash write protection (modifies the chip configuration).
.SH EXAMPLES
.PP
List detected devices:
.PP
.in +4n
.EX
.RB "$ " "wch-isp list"
0: BTVER v2.7 UID 8d-ff-ba-e4-c2-84-09-69 [0x1069] CH569
1: BTVER v2.5 UID f2-3e-88-26-3b-38-b5-9d [0x1980] CH32V208WBU6
.EE
.in
.PP
Flash the
.B firmware.bin
file,
.B \-p
enable the progress bar.
.PP
.in +4n
.EX
.RB "$ " "wch-isp -p flash firmware.bin"
BTVER v2.5 UID f2-3e-88-26-3b-38-b5-9d [0x1980] CH32V208WBU6
[####################################################] write 35392/35392
[####################################################] verify 35392/35392
flash done
.EE
.in
.PP
Erase the device's flash, select the device by it's uid (option
.BR \-d ).
.PP
.in +4n
.EX
.RB "$ " "wch-isp -d f2-3e-88-26-3b-38-b5-9d erase"
BTVER v2.5 UID f2-3e-88-26-3b-38-b5-9d [0x1980] CH32V208WBU6
erase done