Closed pdietl closed 6 months ago
I don't know enough Rust to understand how to fix it. When attempting to run wlink status, I kept getting the error message
wlink status
Error: WCH-Link not found, please check your connection
I eventually figured out that it was because I neglected to setup a udev rule for the DAP mode of the WCH-Link. I dove into the code and tracked down the failure to here: https://github.com/ch32-rs/wlink/blob/main/src/usb_device.rs#L116
udev
DAP
Using rust-gdb to step deeper, indeed libusb was returning error code -3, meaning permission denied.
rust-gdb
libusb
-3
I see in errors.rs that this https://github.com/ch32-rs/wlink/blob/main/src/error.rs#L12-L13 is a thing, but somehow this USB error gets converted into ProbeNotFound.
errors.rs
ProbeNotFound
Nvm somehow it works an I was confused :sweat_smile:
I don't know enough Rust to understand how to fix it. When attempting to run
wlink status
, I kept getting the error messageI eventually figured out that it was because I neglected to setup a
udev
rule for theDAP
mode of the WCH-Link. I dove into the code and tracked down the failure to here: https://github.com/ch32-rs/wlink/blob/main/src/usb_device.rs#L116Using
rust-gdb
to step deeper, indeedlibusb
was returning error code-3
, meaning permission denied.I see in
errors.rs
that this https://github.com/ch32-rs/wlink/blob/main/src/error.rs#L12-L13 is a thing, but somehow this USB error gets converted intoProbeNotFound
.