kendryte / kflash.py

kflash, A Python-based cross-platform Kendryte K210 UART ISP Utility
MIT License
94 stars 56 forks source link

"Warning: recv unknown op 250" on Maix Go #21

Closed laanwj closed 5 years ago

laanwj commented 5 years ago

I'm trying to flash a newly downloeded firmware on a Sipeed Go (from Ubuntu 18.04), however it always seems to time out

$ ./kflash.py -v -p /dev/ttyUSB0 -B goE ../maixpy_v0.2.4_minimum.bin
[INFO] COM Port Selected Manually:  /dev/ttyUSB0
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode...
*Warning: recv unknown op 250

[INFO] Greeting Message Detected, Start Downloading ISP
[WARN] Use built-in ISP_PROG2, If you download firmware to flash  failed, please use -i1
Traceback (most recent call last):
  File "./kflash.py", line 892, in <module>
    loader.install_flash_bootloader(ISP_PROG2)
  File "./kflash.py", line 738, in install_flash_bootloader
    self.flash_dataframe(data, address=0x80000000)
  File "./kflash.py", line 683, in flash_dataframe
    if self.recv_debug():
  File "./kflash.py", line 626, in recv_debug
    op, reason, text = ISPResponse.parse(self.recv_one_return())
  File "./kflash.py", line 452, in recv_one_return
    raise TimeoutError
__main__.TimeoutError

I have tried the suggested -i1, but to no avail.

laanwj commented 5 years ago

Apparently I was using the wrong USB serial port, sorry, works perfectly with /dev/ttyUSB1 which is selected automatically. (note that https://maixpy.sipeed.com/en/get_started/upgrade_firmware.html suggests using /dev/ttyUSB0 which is probably where my confusion came from)