Hello,

I'm trying to flash Lubuntu but the flashing fails with:

Code: Select all

# Pressing POWER, BOOT and MASKROM to enter MASKROM mode
$ sudo upgrade_tool uf MiniLoaderAll.bin
argc=3
Loading loader...
Support Type:RK330C     Loader ver:1.09 Loader Time:2018-06-25 14:05:25
Creating Comm Object failed!


Meanwhile, if I observe the USB-connection, I can observe:

Code: Select all

[ 4019.591443] usb 1-3: new high-speed USB device number 34 using xhci_hcd
[ 4019.731558] usb 1-3: New USB device found, idVendor=2207, idProduct=330c, bcdDevice= 1.00
[ 4019.731561] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
# I start flashing
[ 4029.661372] usb 1-3: reset high-speed USB device number 34 using xhci_hcd
[ 4034.994165] usb 1-3: device descriptor read/64, error -110
[ 4045.447723] usb 1-3: device descriptor read/64, error -71
[ 4045.677770] usb 1-3: reset high-speed USB device number 34 using xhci_hcd
[ 4045.801311] usb 1-3: device descriptor read/64, error -71
[ 4046.030917] usb 1-3: device descriptor read/64, error -71
[ 4046.260982] usb 1-3: reset high-speed USB device number 34 using xhci_hcd
[ 4046.261056] usb 1-3: Device not responding to setup address.
[ 4046.467756] usb 1-3: Device not responding to setup address.
[ 4046.674710] usb 1-3: device not accepting address 34, error -71
[ 4046.797997] usb 1-3: reset high-speed USB device number 34 using xhci_hcd
[ 4046.798172] usb 1-3: Device not responding to setup address.
[ 4047.004821] usb 1-3: Device not responding to setup address.
[ 4047.210870] usb 1-3: device not accepting address 34, error -71
[ 4047.211483] usb 1-3: USB disconnect, device number 34
[ 4047.334131] usb 1-3: new high-speed USB device number 35 using xhci_hcd
[ 4047.457461] usb 1-3: device descriptor read/64, error -71
[ 4047.687596] usb 1-3: device descriptor read/64, error -71
[ 4047.917611] usb 1-3: new high-speed USB device number 36 using xhci_hcd
[ 4048.041331] usb 1-3: device descriptor read/64, error -71
[ 4048.271305] usb 1-3: device descriptor read/64, error -71
[ 4048.377482] usb usb1-port3: attempt power cycle
# Flashing fails
[ 4049.020904] usb 1-3: new high-speed USB device number 37 using xhci_hcd
[ 4049.021073] usb 1-3: Device not responding to setup address.
[ 4049.227484] usb 1-3: Device not responding to setup address.
[ 4049.434492] usb 1-3: device not accepting address 37, error -71
[ 4049.557949] usb 1-3: new high-speed USB device number 38 using xhci_hcd
[ 4049.558119] usb 1-3: Device not responding to setup address.
[ 4049.764756] usb 1-3: Device not responding to setup address.
[ 4049.971214] usb 1-3: device not accepting address 38, error -71
[ 4049.971250] usb usb1-port3: unable to enumerate USB device


I've checked the cable and also tried a brand new one, also on different PCs, on different ports, to no avail. I also applied the change to udev rules, as suggested here: http://wiki.radxa.com/Rock/flash_the_image#Creating_Comm_Object_failed.21.

If I run the tool interactively, I can see a bit more:

Code: Select all

$ sudo upgrade_tool                     
List of rockusb connected
DevNo=1 Vid=0x2207,Pid=0x330c,LocationID=304    Maskrom
Found 1 rockusb,Select input DevNo,Rescan press <R>,Quit press <Q>:1

---------------------Tool Usage ---------------------
Help:             H
Quit:             Q
Version:          V
Clear Screen:     CS
------------------Upgrade Command ------------------
ChooseDevice:           CD
SwitchDevice:           SD
UpgradeFirmware:        UF <Firmware>
UpgradeLoader:          UL <Loader>
DownloadImage:          DI <-p|-b|-k|-s|-r|-m image> [parameter file]
DownloadBoot:           DB <Loader>
EraseFlash:             EF <Loader|firmware>
LowerFormat:            LF
----------------Professional Command -----------------
TestDevice:             TD
ResetDevice:            RD [subcode]
ResetPipe:              RP [pipe]
ReadFlashID:            RID
ReadFlashInfo:          RFI
ReadChipInfo:           RCI
ReadSector:             RS  <BeginSec> <SectorLen> [-decode] [File]
WriteSector:            WS  <BeginSec> <File>
ReadLBA:                RL  <BeginSec> <SectorLen> [File]
WriteLBA:               WL  <BeginSec> <File>
ReadEfuse:              RF  <Begin> <Length> [File]
WriteEfuse:             WF  <Begin> <File|"Data">
EraseBlock:             EB <CS> <BeginBlock> <BlokcLen> [--Force]
-------------------------------------------------------

Rockusb>uf MiniLoaderAll.bin
Loading firmware...
Support Type:RK330C     FW Ver:0.0.00   FW Time:0000-00-00 00:00:00
Loader ver:1.09 Loader Time:2018-06-25 14:05:25
Download Firmware Start
[1]    7808 segmentation fault  sudo upgrade_tool


and in dmesg:

Code: Select all

[ 4729.414276] upgrade_tool[7809]: segfault at 0 ip 00000000f7ac5d61 sp 00000000fff72300 error 4 in libc-2.28.so[f7a6e000+14f000]


gdb gives me:

Code: Select all

Core was generated by `upgrade_tool'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xf7ac5d61 in fseeko64 () from /usr/lib32/libc.so.6
[Current thread is 1 (Thread 0xf7a53940 (LWP 7809))]
(gdb) bt
#0  0xf7ac5d61 in fseeko64 () from /usr/lib32/libc.so.6
#1  0x08080c45 in CRKImage::GetData (this=0x97730f0, dwOffset=0, dwSize=16384, lpBuffer=0x9774b40 "") at upgrade_tool/RKImage.cpp:152
#2  0x08055f3f in CRK28Device::DownloadImage (this=0x9773820) at upgrade_tool/RK28Device.cpp:1508
#3  0x0808242c in CRKUpgrade::Run (this=0x9773e10) at upgrade_tool/RKUpgrade.cpp:2664
#4  0x08062bfc in upgrade_firmware (dev=..., szFirmware=0x0) at upgrade_tool/main.cpp:1480
#5  0x0804d51b in main (argc=1, argv=0xfff72e54) at upgrade_tool/main.cpp:4678


What's wrong with my device?