ch32-rs / wlink

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

Flash Program #47

Open dominic-nhat-ng opened 10 months ago

dominic-nhat-ng commented 10 months ago

Hi, I have an issue when I try using command wlink status. How can fix this issue?

16:26:11 [INFO] Connected to WCH-Link v2.11(v31) (WCH-LinkE-CH32V305)
Error: WCH-Link underlying protocol error: 0x55 [
    0x81,
    0x55,
    0x01,
    0x02,
]

When I tried with another commands like wlink flash, wlink erase,... I faced the problem

17:48:52 [INFO] Connected to WCH-Link v2.11(v31) (WCH-LinkE-CH32V305)
Error: Probe is not attached to an MCU, or debug is not enabled. (hint: use wchisp to enable debug)

And when I use MounRiver Studio, I can't configure as well as connect with my chip When I configure in Download Configure for CH32V00x, I face the notification Failed to configure mcu. When I flash project, console show

------------ Begin flash process of "obj/CH32V003F4U6.bin" ------------ 
00:28:32:845 >> Current project vendor is WCH, debugger is WCH-Link

00:28:32:845 >> Attempt to open link device and upgrade firmware if necessary...
00:28:32:897 >> Link Device is CH32V305. Already the latest version v2.11, no need to upgrade

00:28:33:452 >> Failed to configure mcu.
Failed to configure mcu. Please refer to "WCH-LinkUserManual.pdf" for more help.

00:28:33:452 >> Starting to Close Link...
00:28:33:452 >> Close Link Success
---------------------------------End ----------------------------------

I tried with .hex and .bin file, but both cannot flash and I use Ubuntu 23.04 Hope everyone can give me a solution

andelf commented 9 months ago

There's something wrong with the usb communication under Linux. I'll check this.

dominic-nhat-ng commented 8 months ago

Thanks sir, I've solved that problem, and I have a question about CH32 flash usb, when I try flash program into my mcu, I can't understand why my usb sometimes update itself, and I need 2 device to update firmware for my version of mcu. I’m not change mcu, mcu series is CH32V003