PlatformIO Community

Windows 10 Driver for wio lite risc-v board

Hi all,
Looking for a driver for my new board. Downloaded and ran the “USB Virtual Com Port Driver_v2.0.2.2673” file from the Gigadevices tech site. It says x64 install is successful, but device still shows as “Unknown”. Ran in admin mode and rebooted…still no success. Anyone else using this board from Seeed Studio?
Thanks
Dan

Do you see a new COM port in the device manager though?

What is the VID and PID of the “unknown” device? Example:

grafik

Hi, Max,
Thanks for the reply.
I don’t see a new COM device. I see an “Other Device” as Unknown.
The unknown device VID is 28E9 and the PID is 0189. It looks like the .inf file, shown during driver install, references a device with the VID of 28E9 and a PID of 018A.
I tried using the DFU to contact the board and that works. The board VID/PID is consistant with the unknown device. I thought maybe Platformio could use the DFU interface, but I guess that’s not the case. I have a j-link, so maybe that’s next.
Anyway, thanks for your response. it’s appreciated.
Dan

How through which tools did you flash it via DFU?

Also PIO knows more than only the serial for upload_protocol, see https://docs.platformio.org/en/latest/boards/gd32v/wio_lite_risc-v.html#uploading

Which .inf file? I can’t easily get a .inf file from the USB_Virtual_Com_Port_Driver_v2.0.2.2673.rar archive or exe from http://gd32mcu.21ic.com/en/index. If the driver references a wrong product ID it may not actually be the right driver for it?

But the VendorID is definitely correct…

grafik

Oh right at C:\Windows\System32\DriverStore\FileRepository\gdusb2ser.inf_amd64_a35a8d9f36c4653e it says

;
; GDUSB2Ser.inf
;

[Version]
Signature="$WINDOWS NT$"
Class=Ports						
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}		
Provider=%ManufacturerName%
CatalogFile=gdcatalogfile.cat
DriverVer=06/08/2017,10.21.28.536

[DestinationDirs]
Drivers_Dir = 12 

;*****************************************
; Install Section
;*****************************************

[Manufacturer]
%ManufacturerName%=Standard,NTx86,NTamd64

[Standard.NTx86]
%GD32VCP.DeviceDesc%=GD32VCP_Device, USB\VID_28E9&PID_018A
%GD32VCP.DeviceDesc%=GD32VCP_Device, USB\VID_28E9&PID_028B&MI_01
%GD32VCP.DeviceDesc%=GD32VCP_Device, USB\VID_28E9&PID_028C&MI_01
%GD32VCP.DeviceDesc%=GD32VCP_Device, USB\VID_28E9&PID_028D&MI_01

[Standard.NTamd64]
%GD32VCP.DeviceDesc%=GD32VCP_Device, USB\VID_28E9&PID_018A
%GD32VCP.DeviceDesc%=GD32VCP_Device, USB\VID_28E9&PID_028B&MI_01
%GD32VCP.DeviceDesc%=GD32VCP_Device, USB\VID_28E9&PID_028C&MI_01
%GD32VCP.DeviceDesc%=GD32VCP_Device, USB\VID_28E9&PID_028D&MI_01

[GD32VCP_Device.NT]
;Include=mdmcpq.inf							
;CopyFiles=FakeModemCopyFileSection
AddReg=GD32VCP_AddReg

[GD32VCP_AddReg]
; By default, USBDevice class uses iProduct descriptor to name the device in
; Device Manager on Windows 8 and higher.
; Uncomment for this device to use %DeviceName% on Windows 8 and higher:
;HKR,,FriendlyName,,%GD32VCP.DeviceDesc%
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,usbser.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"

;-------------- Service installation
[GD32VCP_Device.NT.Services]
AddService = GD32VCP,%SPSVCINST_ASSOCSERVICE%, GD32VCP_Service_Inst

; -------------- GD32VCP driver install sections
[GD32VCP_Service_Inst]
DisplayName    = %GD32VCP.SVCDESC%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\usbser.sys
LoadOrderGroup = Extended Base ;

;
;---------------- Strings Defines --------------------
;

[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
ManufacturerName="GigaDevice"
DiskName = "GD Virtual Com Port Driver Installation Disk"
GD32VCP.DeviceDesc = "GD32 Virtual Com Port"
GD32VCP.SVCDESC = "USB Driver for GD device v1.0"

now the $1 mio question is, is it the right driver. This driver also dates to 2017-09-21, was this device even out then?

Hi Max,

I used the GD32 MCU Dfu Tool_v3.8.1.5784 from the GigaDevices Support site. I didn’t flash the device, although I could with this tool. I just used it to make sure the device was functional. I also used it to take a look at the Vid Pid.

I checked the upload_protocols for the board and DFU is not supported. As I said in my last note, I have a J-Link so I’ll try that tomorrow.

When you run the USB_Virtual_Com_Port_Driver_v2.0.2.2673, keep that directory open and the driver files will appear in that directory…after the install. Don’t close the installer or they will be deleted. A directory, GD_Virtual_Com_Driver will appear after the install. Inside that directory, you’ll see the .inf , sys and cat files associated with that driver. When you exit the install, all is gone.

I

I think this device is relatively new. I think it’s never been updated. The only reason I downloaded it is because of a message on a GigaDevice Community site. It specifically referenced the wio-lite-risc-v board.

Hmm looking at the commit for the USB-DFU

It seems like desc->idVendor == 0x28e9 && desc->idProduct == 0x0189 is indeed the USB device used for DFU flashing? And the virtual serial port might be a different use a one? What exact code are running as a main firmware and what’s the content of your variant folder?

First, Here is the link to the Seeed Studio Forum regarding the driver.
https://forum.seeedstudio.com/viewtopic.php?f=72&t=33571&p=56740&hilit=virtual+com&sid=f140a6530a817f3d06417e346f06c94a#p56740

Second, It appears some kind of blink app is running on both of the new Wio Lite boards. One second flashing. I’m not sure of the currently running firmware. The boards are virgin boards from SeeedStudio.

Third, My variant folder contains two h and c files from the gd32vf103_eval folder in the same variants folder, modified a bit. I figured I’d be safe because the blink app I want to run only accesses the LED port pin PA8

So PIO might be able to flash for the Arduino framework via DFU when the platformio.ini is given the line

upload_protocol = dfu

because there seems to be code to handle it, but isn’t used really https://github.com/sipeed/platform-gd32v/blob/master/builder/main.py#L137-L146.

And then there’s also the question which dfu-util.exe it’ll be using then, because it must use a compiled version of https://github.com/riscv-mcu/gd32-dfu-utils.

Were you able to flash the device with PIO via USB-DFU yet?

Aha there also seems to be crucial information there on a related board (with the same MCU), that uses Zadig to change the drivers to WinUSB to do DFU uploading…

http://longan.sipeed.com/en/get_started/blink.html#usb-dfu-download

I tried yesterday to flash with upload_protocol = dfu
result:
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Cannot open DFU device 28e9:0189
No DFU capable USB device available
*** [upload] Error 74

Thanks for the info. If the board is attached, zadig_v2.0.1.160 won’t run.
If I disconnect the board, Zadig will run. As soon as I plug in the board, Zadig crashes…no error messages, just stops and disappears. How’s that for weird?

Aha will you have a look at that. If you download and install the drivers linked in http://longan.sipeed.com/en/get_started/blink.html#usb-dfu-download_1 things might change. The GD32 MCU Dfu Drivers_v1.0.1.2316\x64\GD32 MCU Dfu Drivers.exe contain a driver for the exact PID and VID you’ve listed

[Standard.NTamd64]
%GDDFUDriver.DeviceDesc%=GDDFUDriver_Device, USB\VID_28E9&PID_0189
[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
ManufacturerName="GigaDevice"
ClassName="Universal Serial Bus devices"
DiskName = "GD Driver 2.0 Installation Disk"
GDDFUDriver.DeviceDesc = "GD32 Device in DFU Mode"
GDDFUDriver.SVCDESC = "USB Driver for GD device v2.0"
REG_MULTI_SZ = 0x00010000

Do you then get a GD32 Device in DFU Mode device in the device manager?

You are referencing the DFU driver and tools I have. When I install the DFU Driver, I get GD32 Device in DFU Mode in the device manager. I downloaded Zadig-2.4. Zadig doesn’t crash anymore but it can’t find the DFU device. If I list all, every USB device is there except the “GD32 Device in DFU Mode”

Hm interesting. Does the error message change when a DFU upload is attempted via PIO & upload_protocol = dfu?

It knows the device is there, because it referenced the Vid-Pid in the error message, but it can’t open it. Probably because it’s the wrong firmware or DFU loader in there.
I’m not sure why Zadig can’t find it. If it could, I could load the correct USB Driver. I have a request into GigaDevices Support but haven’t heard anything yet.
Thanks for your help.

Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Cannot open DFU device 28e9:0189
No DFU capable USB device available
*** [upload] Error 74

Running it as administrator? Restarted PC?

Successfully uploaded today using GD32 MCU DFU Tool. I compiled the PlatformIO GD32 demo blink app and uploaded the firmware.bin file from the .pio/build folder. Not the most ideal way, but It’ll do for now.
Thanks for all your assistance Max

Huh interesting. I’ve gotten myself this cheap board too and (after china-like delivery times) will revisit it for a clean solution, because it is supposed to be supported by PIO.

Nice that uploading works now, but getting a USB-CDC (virtual COM port) is still out of reach?

I also totally noticed just now that I’ve been referencing the wrong Arduino core, ouch. It’s not https://github.com/sipeed/Maixduino (K210 MCUs) but https://github.com/sipeed/Longduino (GD-32V MCUs). And there’s also a wio_lite_risc-v variant folder pre-provided. If you use platform_packages = framework-arduino-gd32v @ https://github.com/sipeed/Longduino.git in the platformio.ini you do not (and must remove) your custom variant folder.

There also seems to be USB APIs but not a ready-made USB serial as with STM32Duino or related :confused: