ch32-rs / wlink

An open source WCH-Link library/command line tool written in Rust.
Apache License 2.0
157 stars 26 forks source link

Faild to found entry on Windows OS #5

Open tonyho opened 1 year ago

tonyho commented 1 year ago

Using in Windows 10 LTSC with Administrator permission Error Log:

.\wlink.exe
Error: USB error: Entity not found

Caused by:
    Entity not found

I can use MountRiver IDE to burn in the same environment even if the wlink command line failed, so the USB and the wch link tool are OK.

UCSIG commented 1 year ago

You have to change the driver that Windows uses to access the WCH-Link to WinUSB (or libusb-win32), so that the wlink tool can talk to the WCH-Link device.

You can do that with the Zadig tool. In Zadig, list all devices by selecting Options -> List All Devices. Now you should be able to see WCH-Link (Interface 0) andWCH-Link (Interface 1) in the devices dropdown list.

Select WCH-Link (Interface 0). The currently installed driver will most likely be WCHLink_A64. Select WinUSB as the new driver and click Replace Driver to replace the currently installed one with WinUSB. Now you should be able to use the wlink cli tool.

However, now you can't use MounRiver Studio anymore to flash the mcu. In order to be able to use MounRiver again, use their driver installer to replace the WinUSB driver with their driver. The installer can be found in the programs installation directory under LinkDrv\WCHLink\DRVSETUP64\DRVSETUP64.exe.

andelf commented 11 months ago

I should have added a better error description.

andelf commented 10 months ago

I'm writing an interface for the official Windows driver. The only drawback is.... it should be 32-bit.

andelf commented 8 months ago

Could you help to check the nightly release? I've added a windows native driver support.

Plecra commented 7 months ago

I've tried the new windows driver - plenty of features work :) But serial debug print doesn't seem to get properly forwarded to the COM port

Edit: The serial enable command works too! I'm afraid I muddled around with a lot of settings but with the newest versions of all the WCH-Link drivers I've got working debug -> com5 printf ^^ Awesome job

andelf commented 7 months ago

@Plecra , Thanks for your feedback.

I'm looking for a method to simplify command lines. An acceptable approach would be to include commonly used combinations in the --help doc.