google-coral / edgetpu

Coral issue tracker (and legacy Edge TPU API source)
https://coral.ai
Apache License 2.0
411 stars 124 forks source link

Encountered an error during flashing: Unable to find device in SDP mode #856

Closed harshajk closed 3 days ago

harshajk commented 4 days ago

Description

Following the step 4 in the guide - https://coral.ai/docs/dev-board-micro/get-started/#5-try-the-face-detection-example

(coralai) harshajk@Harsha-JK:~/coralai/coralmicro$ python3 scripts/flashtool.py -e detect_faces 
...
Encountered an error during flashing: Unable to find device in SDP mode.
Click to expand! ### Issue Type Bug ### Operating System Ubuntu ### Coral Device Dev Board Micro ### Other Devices _No response_ ### Programming Language C++ ### Relevant Log Output ```shell (coralai) harshajk@Harsha-JK:~/coralai/coralmicro$ python3 scripts/flashtool.py -e detect_faces Finding all necessary files Creating Filesystem Section: 0x0 iMX bootable image generated successfully Boot Section 0x00000000: FILL | adr=0x00010000 | len=0x00000004 | ptn=0xc2000105 FILL | adr=0x00010004 | len=0x00000004 | ptn=0x00010020 FILL | adr=0x00010008 | len=0x00000004 | ptn=0x00040004 FILL | adr=0x0001000c | len=0x00000004 | ptn=0x00080004 FILL | adr=0x00010020 | len=0x00000004 | ptn=0xc0010021 ENA | adr=0x00010000 | cnt=0x00000004 | flg=0x0110 ERAS | adr=0x00000004 | cnt=0x00000004 | flg=0x0110 ERAS | adr=0x00000008 | cnt=0x00000004 | flg=0x0110 ERAS | adr=0x0000000c | cnt=0x00000040 | flg=0x0110 LOAD | adr=0x00000004 | len=0x00017854 | crc=0x05aa6939 | flg=0x0110 LOAD | adr=0x00000008 | len=0x00017854 | crc=0xc7357e70 | flg=0x0110 STATE_CHECK_FOR_ANY STATE_CHECK_FOR_CORAL_MICRO STATE_RESET_TO_SDP STATE_CHECK_FOR_SDP Encountered an error during flashing: Unable to find device in SDP mode. ```
harshajk commented 4 days ago

In some cases the error message is as below:

(coralai) harshajk@Harsha-JK:~/coralai/coralmicro$ python3 scripts/flashtool.py -e detect_faces --nodata
Finding all necessary files
Creating Filesystem
    Section: 0x0
iMX bootable image generated successfully
Boot Section 0x00000000:
  FILL | adr=0x00010000 | len=0x00000004 | ptn=0xc2000105
  FILL | adr=0x00010004 | len=0x00000004 | ptn=0x00010020
  FILL | adr=0x00010008 | len=0x00000004 | ptn=0x00040004
  FILL | adr=0x0001000c | len=0x00000004 | ptn=0x00080004
  FILL | adr=0x00010020 | len=0x00000004 | ptn=0xc0010021
  ENA  | adr=0x00010000 | cnt=0x00000004 | flg=0x0110
  ERAS | adr=0x00000004 | cnt=0x00000004 | flg=0x0110
  ERAS | adr=0x00000008 | cnt=0x00000004 | flg=0x0110
  LOAD | adr=0x00000004 | len=0x00017854 | crc=0xce032b49 | flg=0x0110
  LOAD | adr=0x00000008 | len=0x00017854 | crc=0x627b659a | flg=0x0110
STATE_CHECK_FOR_ANY
STATE_CHECK_FOR_CORAL_MICRO
STATE_RESET_TO_SDP
STATE_CHECK_FOR_SDP
STATE_LOAD_FLASHLOADER
Traceback (most recent call last):
  File "/home/harshajk/coralai/coralmicro/scripts/flashtool.py", line 1193, in <module>
    main()
  File "/home/harshajk/coralai/coralmicro/scripts/flashtool.py", line 1182, in main
    RunFlashtool(StateCheckForAny, sbfile_path=sbfile_path,
  File "/home/harshajk/coralai/coralmicro/scripts/flashtool.py", line 821, in RunFlashtool
    (prev_state, state) = (state, state(**state_kwargs))
  File "/home/harshajk/coralai/coralmicro/scripts/flashtool.py", line 543, in StateLoadFlashloader
    subprocess.check_call([blhost_path, '-u', sdp_vidpid(), '--', 'load-image',
  File "/home/harshajk/anaconda3/envs/coralai/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/harshajk/coralai/coralmicro/third_party/nxp/blhost/bin/linux/amd64/blhost', '-u', '0x1fc9,0x13d', '--', 'load-image', '/tmp/tmpqgyhskxx/ivt_flashloader.bin']' returned non-zero exit status 1.
harshajk commented 3 days ago

Following the steps mentioned in Flashing stuck at state check for sdp helped. I entered the Serial Download Protocol manually and am able to flash again.

google-coral-bot[bot] commented 3 days ago

Are you satisfied with the resolution of your issue? Yes No