diff --git a/minichlink/99-WCH-LinkE.rules b/minichlink/99-WCH-LinkE.rules new file mode 100644 index 0000000000000000000000000000000000000000..ff1d7332da3f9d86b89c097d582109ea31bbb836 --- /dev/null +++ b/minichlink/99-WCH-LinkE.rules @@ -0,0 +1 @@ +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="8010", GROUP="plugdev", MODE="0666" diff --git a/minichlink/Makefile b/minichlink/Makefile index c39a0e1b5bdd155862975f1ae1696726d27d8dbe..bc4b278347cbcd122a33551530f02000d486e70f 100644 --- a/minichlink/Makefile +++ b/minichlink/Makefile @@ -9,7 +9,7 @@ minichlink : minichlink.c gcc -o $@ $^ $(LDFLAGS) $(CFLAGS) install_udev_rules : - echo "SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"8010\", GROUP=\"plugdev\", MODE=\"0666\"" > /etc/udev/rules.d/99-qch-LinkE.rules + cp 99-WCH-LinkE.rules /etc/udev/rules.d/ service udev restart clean : diff --git a/minichlink/README.md b/minichlink/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6b8d8c6533af2502a3947fd3641a9fdc95299f7e --- /dev/null +++ b/minichlink/README.md @@ -0,0 +1,29 @@ +# minichlink + +A free, open mechanism to use the CH-LinkE $4 programming dongle for the CH32V003. + +If on Linux, be sure to type make sure to install the `99-WCH-LinkE.rules` build rule to `/etc/udev/rules.d/` + +On Windows, if you need to you can install the WinUSB driver over the WCH interface 1. + +The exe here is about 12kB and contains everything except for the libusb driver. In Linux you need `libusb-1.0-dev`. + +## Usage + +``` +Usage: minichlink [args] + single-letter args may be combined, i.e. -3r + multi-part args cannot. + -3 Enable 3.3V + -5 Enable 5V + -t Disable 3.3V + -f Disable 5V + -r Release from reest + -R Place into Reset + -D Configure NRST as GPIO **WARNING** If you do this and you reconfig + the SWIO pin (PD1) on boot, your part can never again be programmed! + -d Configure NRST as NRST + -w [binary image to write] + -o [memory address, decimal or 0x, try 0x08000000] [size, decimal or 0x, try 16384] [output binary image] +``` +