Community-PIO-CH32V / platform-ch32v

PlatformIO platform for CH32V RISC-V chips (CH32V003, CH32V103, CH32V20x, CH32V30x, CH32X035) and CH56x, CH57x, CH58x, CH59x
Apache License 2.0
203 stars 34 forks source link

Is there any way to make PIO-CH32V work with Winusb? #64

Closed Rockwell1799 closed 2 months ago

Rockwell1799 commented 2 months ago

I'm on windows 11 and the vscode with PIO-CH32 is working fine with the CH32V003FUN project,but I want to use the minichlink ,but unfortunately it's only working with Winusb not the proprietary CH-link driver and Vscode with PIO32 doesn't work with Winusb. So,is there any way to still use Vscode and minichlink at the same time? TIA

maxgerhardt commented 2 months ago

Please try the upload protocols

upload_protocol = minichlink

and

upload_protocol = wlink
Rockwell1799 commented 2 months ago

Thank you! I guess you meant either minichlink or wlink?

maxgerhardt commented 2 months ago

Yes. They will use https://github.com/cnlohr/ch32v003fun/tree/master/minichlink or https://github.com/ch32-rs/wlink/ respectively. However, with minichlink I have not yet integrated the debugging feature, there are some problems with it; so they can only upload properly, not debug.

Rockwell1799 commented 2 months ago

Thank you for your prompt reply! Let's say if I want to use wlink, in which path do I have to copy wlink.exe?

maxgerhardt commented 2 months ago

None at all. The platform manages it internally. If you set upload_protocol = wlink, it will download the package as specified in the platform.json into C:\Users\<user>\.platformio\packages\tool-wlink and call it from there when it's time to upload. You don't need to manually download anything, only tell PlatformIO that you want to use that upload protocol with the line in the platformio.ini. Automatic package management is a key feature of PlatformIO.

Rockwell1799 commented 2 months ago

Thank you Max, you are very helpful! I'm going to try that when I get back home.