Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Commit

Permalink
Update manpage and README
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaselbas committed Jan 6, 2024
1 parent cb96d2d commit bda3070
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ This utility started as a rewrite in C of the rust tool [wchisp](https://github.
usage: wch-isp [-VDnpr] [-d <uid>] COMMAND [ARG ...]
wch-isp [-VDnpr] [-d <uid>] [flash|write|verify|reset] FILE
wch-isp [-VDnpr] [-d <uid>] [erase|config|remove-wp]
wch-isp [-VDnpr] list
wch-isp [-VDnpr] [list]
options:
-d <uid> Select the usb device that matches the uid
-d <uid> Select the usb device that matches by uid first, else by index
-n No verify after writing to flash, done by default
-p Print a progress-bar during command operation
-r Reset after command completed
Expand All @@ -30,14 +30,15 @@ This utility has been tested on:
List detected device in bootloader mode:
```sh
$ 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
0: BTVER v2.7 UID 8d-ff-ba-e4-c2-84-09-69 [0x1069] CH569 (flash 448K)
1: BTVER v2.5 UID f2-3e-88-26-3b-38-b5-9d [0x1980] CH32V208WB (flash 128K)
2: BTVER v2.6 UID cd-ab-72-86-45-bc-84-ee [0x1931] CH32V203C8 (flash 64K)
```

Flash the `firmware.bin` file, `-p` enable the progress bar.
```
$ wch-isp -p flash firmware.bin
BTVER v2.5 UID f2-3e-88-26-3b-38-b5-9d [0x1980] CH32V208WBU6
BTVER v2.5 UID f2-3e-88-26-3b-38-b5-9d [0x1980] CH32V208WB (flash 128K)
[####################################################] write 35392/35392
[####################################################] verify 35392/35392
flash done
Expand All @@ -46,7 +47,7 @@ flash done
Erase the device's flash, select the device by it's uid (option `-d`).
```
$ 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
BTVER v2.5 UID f2-3e-88-26-3b-38-b5-9d [0x1980] CH32V208WB (flash 128K)
erase done
```

Expand Down
2 changes: 1 addition & 1 deletion wch-isp.1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ By default the flash content is verified after writing.
.SH OPTIONS
.TP
.B \-d <uid>
Select the USB device that matches the 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.
Expand Down
2 changes: 1 addition & 1 deletion wch-isp.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ usage(int help)
exit(1);

printf("options:\n");
printf(" -d <uid> Select the usb device that matches the uid\n");
printf(" -d <uid> Select the usb device that matches by uid first, else by index\n");
printf(" -n No verify after writing to flash, done by default\n");
printf(" -p Print a progress-bar during command operation\n");
printf(" -r Reset after command completed\n");
Expand Down

0 comments on commit bda3070

Please sign in to comment.