-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux upload/debug fails #22
Comments
Seems like I'm not the only one. Here is a page which explains how to solve this issue. I didn't go through the details, but I hope it helps...!? |
I've only tried Linux + WCHLink (not the E version) with a Ch32V307 until now, not yet the WCHLink-E with the CH32V003 or CH32V203 board (although I both have them now :)). The udev rules definitely and entire bringup (and wireup procedure) definitely need to be documented better, that's on the list for this weekend. The repo with the OpenOCD from MounRiver sources is really good, thanks for that. But the link doesn't say anyhting baout the "Error: unknow WCH-LINK" error? :( I'll test this on my WCHLink-E + CH32V{0,2}03 boards today. |
Thanks already in advance! I'm sure it's just a typo, wrong access rights or something similarly simple... I found the page with the OpenOCD from MounRiver sources referenced here |
However, the label on both PCB and ESD bag of the debugger states "WCH-LinkE-R0-1v3.FP". So I figure it's indeed a WCH-LinkE, which is also listed in the WCH-Link manual v1.6 |
My WCHLink-E is also only appearing as "WCH-Link"
... and I am indeed getting the same error message too.
|
If I use MounRiver in Windows with the exact same hardware and go Flash->Download, it spews out at least some firmware version
|
I just sent a support email in regards to it. A smoking gun is definitely that the Windows OpenOCD version is newer than the Linux one.
vs
So they probably haven't released an updated Linux OpenOCD version yet. |
I got confirmation from support that a new version is coming soon.
|
oh darn! I was hoping for a wrong |
What I do on Linux is build in Platform.io and upload using https://github.com/ch32-rs/wchisp - it does upload elf or bin - all you need is to put board into boot mode. I'm sure you can use it as upload_custom script or so. |
We will integrate this natively (tracked in #14) indeed soon. I'm watching the Linux section in http://www.mounriver.com/download on the side. |
Just FYI @martiinezz I've implemented #14 now and created the project https://github.com/Community-PIO-CH32V/platform-ch32v/tree/develop/examples/usb-cdc-wch32v307-none-os which uploads fine via ISP and the USB works too. Though WCHISP does not seem to have the ability to boot the chip into run-application, i.e. when it does a "reset" it still looks at BOOT0 pin state and in my case just ends up in USB ISP bootloader mode again. So after a upload, I physically have to move the BOOT0 jumper back to GND and press the reset button to make the board run the uploaded firmware. |
I'm using Like-E on Debian and it seems to be working for me.
|
What WCH-LinkE firmware version does it show though in MounRiver?
|
Here's the output from MounRiver when I try and flash...
|
like! :-))) |
Linux + WCH-LinkE + CH32V003 is working with the new OpenOCD version.
working on the packages now. |
Awesome :) |
The packages were approved in the PIO registry so this should now work out-of-the box. Easiest way to update is to force a reinstall.
and build again. Reopen if issues persist. |
Thanks a lot!!! I just tried CH32V003 and it works :-) However, I did have to copy |
First of all thanks a lot for your effort! I very much appreciate it :-)
Unfortunately I still have an issue with upload/debug under Linux (Xubuntu 22.04). Here's what I did:
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
lsusb
to get WCH-LinkE debugger VID&PID ->Bus 001 Device 007: ID 1a86:8010 QinHeng Electronics WCH-Link
/etc/udev/rules.d/99-platformio-udev.rules
:Error: unknow WCH-LINK
I tried the above with the CH32V003F4P6-EVT-R0 (1-wire debug) and CH32V203C8T8-EVT-R0 (2-wire debug) eval boards from here. Both boards function using MounRiver IDE under Win10 in a VirtualBox on the same PC. So it's not a hardware or setup issue.
The text was updated successfully, but these errors were encountered: