platform-ch32v: Linux upload/debug fails

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:

  1. Install CH32V platform as described here and here -> no issue
  2. Clone PIO examples projects as described here -> no issue
  3. Open example “blinky-none-os” and build -> no issue
  4. Press upload button -> failed with Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
  5. In terminal type lsusb to get WCH-LinkE debugger VID&PID -> Bus 001 Device 007: ID 1a86:8010 QinHeng Electronics WCH-Link
  6. Add the following lines to /etc/udev/rules.d/99-platformio-udev.rules:
# WCH-LinkE
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="8010", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
  1. Reboot PC and re-try upload -> failed with 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.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 21 (11 by maintainers)

Most upvoted comments

HAHAR!!!

like! 😃))

image

image

HAHAR!!!

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.