I am having a problem flashing an ESP32 with esptool v2.2.1.
It seems that after about 30mins of use, ie: working on a project and successfully re-flashing a new load a several times, it gets into a weird state where it will not flash any longer. (It does continue to run my code ok, and after resets, continues to operate normally, but just will not accept a new download).
I'm using the following:
- ESP-WROOM-32 module soldered onto a Seeed ESP32 breakout board (https://www.seeedstudio.com/ESP32-Break ... -2783.html)
- windows 10
- latest esp-idf from github (March 2, 2018).
- FDTI USB to serial board (and latest D2XX drivers from here: http://www.ftdichip.com/Drivers/D2XX.htm)
I can see that the board is ready to flash (after holding my flash button and resetting the module) via the following in the console output:
Code: Select all
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
After doing some searching around, I enabled the debug trace in the esptool and found that there are no Read logs at all.
I only see the following re-occurring failure/timeout:
Code: Select all
python /home/j/esp/esp-idf/components/esptool_py/esptool/esptool.py --trace --chip esp32 --port COM8 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 /c/Users/j/workspace/esp32TestProgram/build/bootloader/bootloader.bin 0x10000 /c/Users/j/workspace/esp32TestProgram/build/test-program1.bin 0x8000 /c/Users/j/workspace/esp32TestProgram/build/partitions_singleapp.bin
esptool.py v2.2.1
Connecting...
TRACE +0.000 command op=0x08 data len=36 wait_response=1 timeout=0.100 data='\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'
TRACE +0.000 Write 46 bytes: '\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xc0'
TRACE +0.102 Timed out waiting for packet header
.TRACE +0.054 command op=0x08 data len=36 wait_response=1 timeout=0.100 data='\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'
TRACE +0.000 Write 46 bytes: '\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xc0'
TRACE +0.102 Timed out waiting for packet header
.TRACE +0.053 command op=0x08 data len=36 wait_response=1 timeout=0.100 data='\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'
TRACE +0.000 Write 46 bytes: '\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xc0'
TRACE +0.101 Timed out waiting for packet header
.TRACE +0.053 command op=0x08 data len=36 wait_response=1 timeout=0.100 data='\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'
TRACE +0.000 Write 46 bytes: '\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xc0'
TRACE +0.102 Timed out waiting for packet header
<snip....>
TRACE +0.101 Timed out waiting for packet header
_TRACE +0.052 command op=0x08 data len=36 wait_response=1 timeout=0.100 data='\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'
TRACE +0.000 Write 46 bytes: '\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xc0'
TRACE +0.102 Timed out waiting for packet header
_
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
Code: Select all
python /home/j/esp/esp-idf/components/esptool_py/esptool/esptool.py --trace --chip esp32 --port COM8 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 /c/Users/j/workspace/esp32TestProgram/build/bootloader/bootloader.bin 0x10000 /c/Users/j/workspace/esp32TestProgram/build/test-program1.bin 0x8000 /c/Users/j/workspace/esp32TestProgram/build/partitions_singleapp.bin | tee flash.log
esptool.py v2.2.1
Connecting...TRACE +0.000 command op=0x08 data len=36 wait_response=1 timeout=0.100 data='\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'
TRACE +0.001 Write 46 bytes: '\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xc0'
TRACE +0.100 Timed out waiting for packet header
.TRACE +0.053 command op=0x08 data len=36 wait_response=1 timeout=0.100 data='\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'
TRACE +0.000 Write 46 bytes: '\xc0\x00\x08$\x00\x00\x00\x00\x00\x07\x07\x12 UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xc0'
TRACE +0.007 Read 1 bytes: '\xc0'
TRACE +0.000 Read 27 bytes: '\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00\xc0\xc0\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00\xc0'
TRACE +0.000 Full packet: '\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00'
TRACE +0.002 Full packet: '\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00'
TRACE +0.019 Read 1 bytes: '\xc0'
TRACE +0.000 Read 83 bytes: '\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00\xc0\xc0\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00\xc0\xc0\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00\xc0\xc0\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00\xc0\xc0\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00\xc0\xc0\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00\xc0'
TRACE +0.000 Full packet: '\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00'
TRACE +0.003 Full packet: '\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00'
TRACE +0.003 Full packet: '\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00'
TRACE +0.003 Full packet: '\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00'
TRACE +0.003 Full packet: '\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00'
TRACE +0.003 Full packet: '\x01\x08\x04\x00\x07\x12UU\x00\x00\x00\x00'
TRACE +0.003 command op=0x0a data len=4 wait_response=1 timeout=3.000 data='\x0c\xa0\x01`'
TRACE +0.000 Write 14 bytes: '\xc0\x00\n\x04\x00\x00\x00\x00\x00\x0c\xa0\x01`\xc0'
TRACE +0.014 Read 1 bytes: '\xc0'
TRACE +0.000 Read 13 bytes: '\x01\n\x04\x00\x00\x80\x00\x00\x00\x00\x00\x00\xc0'
TRACE +0.000 Full packet: '\x01\n\x04\x00\x00\x80\x00\x00\x00\x00\x00\x00'
Chip is ESP32D0WDQ6 (revision 1)
Uploading stub...
TRACE +0.003 command op=0x05 data len=16 wait_response=1 timeout=3.000 data=' \x0c\x00\x00\x01\x00\x00\x00\x00\x18\x00\x00\x00\x00\t@'
TRACE +0.000 Write 26 bytes: '\xc0\x00\x05\x10\x00\x00\x00\x00\x00 \x0c\x00\x00\x01\x00\x00\x00\x00\x18\x00\x00\x00\x00\t@\xc0'
TRACE +0.013 Read 1 bytes: '\xc0'
TRACE +0.000 Read 13 bytes: '\x01\x05\x04\x00\x00\x80\x00\x00\x00\x00\x00\x00\xc0'
TRACE +0.000 Full packet: '\x01\x05\x04\x00\x00\x80\x00\x00\x00\x00\x00\x00'
<snip....>
I left the problematic board for a few days, but tried it again today with the same results. (ie: after about 30mins of use, I cannot flash it any longer).
Any ideas here?
Is there a bug in the esptool?
Can I change the timeout (ie: this --> timeout=0.100) value somehow?
Thanks,
J