added udev rule
This commit is contained in:
@@ -47,6 +47,39 @@ sudo apt update
|
||||
sudo apt install libusb-1.0-0-dev libudev-dev
|
||||
```
|
||||
|
||||
### 1.3. Fix the USB permissions issue
|
||||
Add a udev rule for WCH-Link / minichlink.
|
||||
|
||||
Before creating the rule, verify the USB vendor and product IDs match your device:
|
||||
```Bash
|
||||
lsusb
|
||||
```
|
||||
Example output:
|
||||
```Bash
|
||||
Bus 001 Device 005: ID 1a86:8010 QinHeng Electronics WCH-Link
|
||||
```
|
||||
Make sure:
|
||||
|
||||
- `1a86` matches `idVendor`
|
||||
- `8010` matches `idProduct`
|
||||
|
||||
If your device reports different IDs, use those values in the rule below.
|
||||
|
||||
Create:
|
||||
```Bash
|
||||
sudo nano /etc/udev/rules.d/99-wch.rules
|
||||
```
|
||||
Add:
|
||||
```Bash
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="1a86", ATTR{idProduct}=="8010", MODE="0666"
|
||||
```
|
||||
Then reload:
|
||||
```Bash
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger
|
||||
```
|
||||
Unplug/replug the programmer.
|
||||
|
||||
## 2. Install Flashing Tool (minichlink)
|
||||
Clone the ch32fun repository and build minichlink:
|
||||
```Bash
|
||||
|
||||
Reference in New Issue
Block a user