espressif / esptool

Espressif SoC serial bootloader utility
https://docs.espressif.com/projects/esptool
GNU General Public License v2.0
5.58k stars 1.38k forks source link

esptool v4.7.0 - esp32-h2 - A fatal error occurred: Packet content transfer stopped (ESPTOOL-810) #955

Closed Z80sp closed 8 months ago

Z80sp commented 9 months ago

Operating System

Linux

Esptool Version

4.7.0

Python Version

Python 3.9.0

Chip Description

esp32-h2-mini-1-n4

Device Description

ESP32-H2-DevKitM-1

Hardware Configuration

The kit as it is from out of the box

How is Esptool Run

Espressif IDF v5.1.2 for Linux

Full Esptool Command Line that Was Run

esptool.py --trace -p /dev/ttyACM0 --baud 115200 --before default_reset --after hard_reset --chip esp32h2 write_flash --flash_mode dio --flash_size 2MB --flash_freq 48m 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/hello_world.bin

Esptool Output

esptool.py v4.7.0
Serial port /dev/ttyACM0
Connecting...TRACE +0.000 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
    0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
    5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
    55555555                          | UUUU
TRACE +0.000 Write 46 bytes:
    c000082400000000 0007071220555555 | ...$........ UUU
    5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
    5555555555555555 5555555555c0     | UUUUUUUUUUUUU.
TRACE +0.005 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010804000707122000000000c0
TRACE +0.000 Received full packet: 010804000707122000000000
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010804000707122000000000c0
TRACE +0.000 Received full packet: 010804000707122000000000
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010804000707122000000000c0
TRACE +0.000 Received full packet: 010804000707122000000000
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010804000707122000000000c0
TRACE +0.000 Received full packet: 010804000707122000000000
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010804000707122000000000c0
TRACE +0.000 Received full packet: 010804000707122000000000
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010804000707122000000000c0
TRACE +0.000 Received full packet: 010804000707122000000000
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010804000707122000000000c0
TRACE +0.000 Received full packet: 010804000707122000000000
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010804000707122000000000c0
TRACE +0.000 Received full packet: 010804000707122000000000

TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=00100040
TRACE +0.000 Write 14 bytes: c0000a04000000000000100040c0
TRACE +0.002 Read 3 bytes: c0010a
TRACE +0.000 Read 1 bytes: 04
TRACE +0.000 Read 10 bytes: 00803eb7d700000000c0
TRACE +0.000 Received full packet: 010a0400803eb7d700000000
TRACE +0.000 command op=0x14 data len=0 wait_response=1 timeout=3.000 data=
TRACE +0.000 Write 10 bytes: c00014000000000000c0
TRACE +0.002 Read 34 bytes:
    c001141800803eb7 d700000000000000 | ......>.........
    000000000c100000 0000000000000000 | ................
    00c0                              | ..
TRACE +0.000 Received full packet:
    01141800803eb7d7 0000000000000000 | .....>..........
    0000000c10000000 0000000000000000 | ................
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=80f58740
TRACE +0.000 Write 14 bytes: c0000a04000000000080f58740c0
TRACE +0.002 Read 3 bytes: c0010a
TRACE +0.000 Read 11 bytes: 04000000000000000000c0
TRACE +0.000 Received full packet: 010a04000000000000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=54080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000054080b60c0
TRACE +0.002 Read 3 bytes: c0010a
TRACE +0.001 Read 1 bytes: 04
TRACE +0.000 Read 10 bytes: 000000000000000000c0
TRACE +0.000 Received full packet: 010a04000000000000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=50080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000050080b60c0
TRACE +0.003 Read 3 bytes: c0010a
TRACE +0.000 Read 11 bytes: 04000000044900000000c0
TRACE +0.000 Received full packet: 010a04000000044900000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=50080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000050080b60c0
TRACE +0.003 Read 3 bytes: c0010a
TRACE +0.000 Read 11 bytes: 04000000044900000000c0
TRACE +0.000 Received full packet: 010a04000000044900000000
Chip is ESP32-H2 (revision v0.1)
Features: BLE, IEEE802.15.4
Crystal is 32MHz
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=44080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000044080b60c0
TRACE +0.002 Read 3 bytes: c0010a
TRACE +0.001 Read 1 bytes: 04
TRACE +0.000 Read 10 bytes: 00f72b60bd00000000c0
TRACE +0.000 Received full packet: 010a0400f72b60bd00000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=48080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000048080b60c0
TRACE +0.003 Read 3 bytes: c0010a
TRACE +0.000 Read 11 bytes: 04004d74feff00000000c0
TRACE +0.000 Received full packet: 010a04004d74feff00000000
MAC: 74:4d:bd:ff:fe:60:2b:f7
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=44080b60
TRACE +0.003 Write 14 bytes: c0000a04000000000044080b60c0
TRACE +0.004 Read 3 bytes: c0010a
TRACE +0.001 Read 1 bytes: 04
TRACE +0.000 Read 10 bytes: 00f72b60bd00000000c0
TRACE +0.000 Received full packet: 010a0400f72b60bd00000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=48080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000048080b60c0
TRACE +0.003 Read 3 bytes: c0010a
TRACE +0.001 Read 1 bytes: 04
TRACE +0.000 Read 10 bytes: 004d74feff00000000c0
TRACE +0.000 Received full packet: 010a04004d74feff00000000
BASE MAC: 74:4d:bd:60:2b:f7
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=44080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000044080b60c0
TRACE +0.002 Read 3 bytes: c0010a
TRACE +0.001 Read 1 bytes: 04
TRACE +0.000 Read 10 bytes: 00f72b60bd00000000c0
TRACE +0.000 Received full packet: 010a0400f72b60bd00000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=48080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000048080b60c0
TRACE +0.002 Read 3 bytes: c0010a
TRACE +0.001 Read 1 bytes: 04
TRACE +0.000 Read 10 bytes: 004d74feff00000000c0
TRACE +0.000 Received full packet: 010a04004d74feff00000000
MAC_EXT: ff:fe
Uploading stub...
TRACE +0.001 command op=0x05 data len=16 wait_response=1 timeout=3.000 data=9c0e0000010000000018000000008040
TRACE +0.000 Write 26 bytes:
    c000051000000000 009c0e0000010000 | ................
    0000180000000080 40c0             | ........@.
TRACE +0.004 Read 14 bytes: c0010504004d74feff00000000c0
TRACE +0.000 Received full packet: 010504004d74feff00000000
TRACE +0.001 command op=0x07 data len=3756 wait_response=1 timeout=3.000 data=
    9c0e000000000000 0000000000000000 | ................
    411122c426c206c6 b7f7006011473704 | A.".&......`.G7.
    8340d8cbb7f40060 13040400dc40918b | .@.....`.....@..
    91e7b24022449244 4101828088401c40 | ...@"D.DA....@.@
.
.
.
    7fffe780202455b2 03a4cb00e30f0498 | .... $U.........
    eff0efd31305803e 97f07fffe780801d | .......>........
    eff08fcf029451b2 eff00fcff6506654 | ......Q......PfT
    d6544659b659265a 965a065bf64b664c | .TFY.Y&Z.Z.[.KfL
    d64c464db64d0961 82800000         | .LFM.M.a....
TRACE +0.005 Write 3787 bytes:
    c00007ac0e350000 009c0e0000000000 | .....5..........
    0000000000000000 00411122c426c206 | .........A.".&..
    c6b7f70060114737 048340d8cbb7f400 | ....`.G7..@.....
    6013040400dc4091 8b91e7b240224492 | `.....@.....@"D.
    444101828088401c 401375f50f8297dd | DA....@.@.u.....
    b70111b70700604e c683a987004ac837 | ......`N.....J.7
    09834026ca52c406 ce22ccb70400607d | ..@&.R..."....`}
.
.
.
    0b9cdc44e38a079c 9307800ca9b783a7 | ...D............
    8b00e393079ceff0 6fd6096513050571 | ........o..e...q
    97f07fffe780e01f eff0efd197f07fff | ................
    e780202455b203a4 cb00e30f0498eff0 | .. $U...........
    efd31305803e97f0 7fffe780801deff0 | .....>..........
    8fcf029451b2eff0 0fcff6506654d654 | ....Q......PfT.T
    4659b659265a965a 065bf64b664cd64c | FY.Y&Z.Z.[.KfL.L
    464db64d09618280 0000c0           | FM.M.a.....
TRACE +0.020 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010704004d74feff00000000c0
TRACE +0.000 Received full packet: 010704004d74feff00000000
TRACE +0.000 command op=0x05 data len=16 wait_response=1 timeout=3.000 data=a00000000100000000180000ac2b8440
TRACE +0.000 Write 26 bytes:
    c000051000000000 00a0000000010000 | ................
    0000180000ac2b84 40c0             | ......+.@.
TRACE +0.004 Read 14 bytes: c0010504004d74feff00000000c0
TRACE +0.000 Received full packet: 010504004d74feff00000000
TRACE +0.000 command op=0x07 data len=176 wait_response=1 timeout=3.000 data=
    a000000000000000 0000000000000000 | ................
    100083403e0a8040 8e0a8040e60a8040 | ...@>..@...@...@
    b40b8040200c8040 ce0b80400a098040 | ...@ ..@...@...@
    700b8040b00b8040 fa0a8040ba088040 | p..@...@...@...@
    2e0b8040ba088040 180a80405e0a8040 | ...@...@...@^..@
    8e0a8040e60a8040 2a0a80406e098040 | ...@...@*..@n..@
    9e098040260a8040 780e80408e0a8040 | ...@&..@x..@...@
    380d8040300e8040 fa078040580e8040 | 8..@0..@...@X..@
    fa078040fa078040 fa078040fa078040 | ...@...@...@...@
    fa078040fa078040 fa078040fa078040 | ...@...@...@...@
    d40c8040fa078040 560d8040300e8040 | ...@...@V..@0..@
TRACE +0.000 Write 186 bytes:
    c00007b000200000 00a0000000000000 | ..... ..........
    0000000000000000 00100083403e0a80 | ............@>..
    408e0a8040e60a80 40b40b8040200c80 | @...@...@...@ ..
    40ce0b80400a0980 40700b8040b00b80 | @...@...@p..@...
    40fa0a8040ba0880 402e0b8040ba0880 | @...@...@...@...
    40180a80405e0a80 408e0a8040e60a80 | @...@^..@...@...
    402a0a80406e0980 409e098040260a80 | @*..@n..@...@&..
    40780e80408e0a80 40380d8040300e80 | @x..@...@8..@0..
    40fa078040580e80 40fa078040fa0780 | @...@X..@...@...
    40fa078040fa0780 40fa078040fa0780 | @...@...@...@...
    40fa078040fa0780 40d40c8040fa0780 | @...@...@...@...
    40560d8040300e80 40c0             | @V..@0..@.
TRACE +0.004 Read 14 bytes: c0010704004d74feff00000000c0
TRACE +0.000 Received full packet: 010704004d74feff00000000
Running stub...
TRACE +0.000 command op=0x06 data len=8 wait_response=1 timeout=0.200 data=0000000090068040
TRACE +0.000 Write 18 bytes:
    c000060800000000 0000000000900680 | ................
    40c0                              | @.
TRACE +0.004 Read 14 bytes: c0010604004d74feff00000000c0
TRACE +0.000 Received full packet: 010604004d74feff00000000
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 4f
TRACE +0.001 Read 1 bytes: 48
TRACE +0.002 Read 1 bytes: 41
TRACE +0.002 Read 1 bytes: 49
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Received full packet: 4f484149
Stub running...
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=18300060
TRACE +0.000 Write 14 bytes: c0000a04000000000018300060c0
TRACE +0.004 Read 1 bytes: c0
TRACE +0.002 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.002 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.002 Read 1 bytes: 00
TRACE +0.002 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 80
TRACE +0.001 Read 1 bytes: 00
TRACE +0.002 Read 1 bytes: 00
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200000000800000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=20300060
TRACE +0.000 Write 14 bytes: c0000a04000000000020300060c0
TRACE +0.004 Read 1 bytes: c0
TRACE +0.002 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.002 Read 1 bytes: 00
TRACE +0.002 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 70
TRACE +0.002 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200000000700000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=2830006017000000ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 0028300060170000 | .........(0.`...
    00ffffffff000000 00c0             | ..........
TRACE +0.003 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=1830006000000090ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 0018300060000000 | ..........0.`...
    90ffffffff000000 00c0             | ..........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=203000609f000070ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 00203000609f0000 | ......... 0.`...
    70ffffffff000000 00c0             | p.........
TRACE +0.003 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.002 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=5830006000000000ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 0058300060000000 | .........X0.`...
    00ffffffff000000 00c0             | ..........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.002 Read 1 bytes: 01
TRACE +0.002 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=0030006000000400ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 0000300060000004 | ..........0.`...
    00ffffffff000000 00c0             | ..........
TRACE +0.004 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=00300060
TRACE +0.000 Write 14 bytes: c0000a04000000000000300060c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200000000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=58300060
TRACE +0.000 Write 14 bytes: c0000a04000000000058300060c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c8
TRACE +0.001 Read 1 bytes: 40
TRACE +0.001 Read 1 bytes: 16
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200c84016000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=1830006000000080ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 0018300060000000 | ..........0.`...
    80ffffffff000000 00c0             | ..........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.002 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.002 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=2030006000000070ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 0020300060000000 | ......... 0.`...
    70ffffffff000000 00c0             | p.........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=18300060
TRACE +0.000 Write 14 bytes: c0000a04000000000018300060c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 80
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200000000800000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=20300060
TRACE +0.000 Write 14 bytes: c0000a04000000000020300060c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 70
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200000000700000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=2830006007000000ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 0028300060070000 | .........(0.`...
    00ffffffff000000 00c0             | ..........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=1c3000600700005cffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 001c300060070000 | ..........0.`...
    5cffffffff000000 00c0             | \.........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=18300060000000f0ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 0018300060000000 | ..........0.`...
    f0ffffffff000000 00c0             | ..........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=203000605a000070ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 00203000605a0000 | ......... 0.`Z..
    70ffffffff000000 00c0             | p.........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=0430006010000000ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 0004300060100000 | ..........0.`...
    00ffffffff000000 00c0             | ..........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.002 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=5830006000000000ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 0058300060000000 | .........X0.`...
    00ffffffff000000 00c0             | ..........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.002 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=0030006000000400ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 0000300060000004 | ..........0.`...
    00ffffffff000000 00c0             | ..........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=00300060
TRACE +0.000 Write 14 bytes: c0000a04000000000000300060c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200000000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=58300060
TRACE +0.000 Write 14 bytes: c0000a04000000000058300060c0
TRACE +0.003 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c8
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200c80000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=1830006000000080ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 0018300060000000 | ..........0.`...
    80ffffffff000000 00c0             | ..........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
TRACE +0.000 command op=0x09 data len=16 wait_response=1 timeout=3.000 data=2030006000000070ffffffff00000000
TRACE +0.000 Write 26 bytes:
    c000091000000000 0020300060000000 | ......... 0.`...
    70ffffffff000000 00c0             | p.........
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 09
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01090200000000000000
Configuring flash size...
TRACE +0.000 command op=0x0b data len=24 wait_response=1 timeout=3.000 data=
    0000000000002000 0000010000100000 | ...... .........
    00010000ffff0000                  | ........
TRACE +0.000 Write 34 bytes:
    c0000b1800000000 0000000000000020 | ...............
    0000000100001000 0000010000ffff00 | ................
    00c0                              | ..
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0b
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010b0200000000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=38080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000038080b60c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200000000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=50080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000050080b60c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 04
TRACE +0.001 Read 1 bytes: 49
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200000004490000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=50080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000050080b60c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 04
TRACE +0.001 Read 1 bytes: 49
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200000004490000
TRACE +0.001 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=50080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000050080b60c0
TRACE +0.003 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 04
TRACE +0.001 Read 1 bytes: 49
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200000004490000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=50080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000050080b60c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 04
TRACE +0.001 Read 1 bytes: 49
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200000004490000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=30080b60
TRACE +0.000 Write 14 bytes: c0000a04000000000030080b60c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 0a
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 010a0200000000000000
Flash will be erased from 0x00000000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00010000 to 0x00035fff...
Compressed 21056 bytes to 12830...
TRACE +0.001 command op=0x10 data len=16 wait_response=1 timeout=3.000 data=40520000010000000040000000000000
TRACE +0.000 Write 26 bytes:
    c000101000000000 0040520000010000 | .........@R.....
    0000400000000000 00c0             | ..@.......
TRACE +0.003 Read 1 bytes: c0
TRACE +0.001 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 10
TRACE +0.001 Read 1 bytes: 02
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01100200000000000000
Writing at 0x00000000... (100 %)
TRACE +0.001 command op=0x11 data len=12846 wait_response=1 timeout=3.000 data=
    1e32000000000000 0000000000000000 | .2..............
    78daad7c0b5c1357 d6f89d2493213c34 | x..|.\.W...$.!<4
    3420bad5358280b2 d62a1153b5608024 | 4 ..5....*.S.`.$
    23f8ac15a9565760 08c8561e1210ed96 | #....VW`..V.....
    150c03a2c5484705 6bdd45aa62d96f6d | .....HG.k.E.b.om
    0bdba6bb5bcb1b7c 151f9f82ba7d6059 | ....[..|.....}`Y
    a5ee6e176a45c48a 7ce7ce4c20587577 | ..n.jE..|..L Xuw
    7fffbfbf5f923be7 9e7beeb9e79ee79d | ...._.;..{......
    8bb7a49289e7cf59 74ff420829e18318 | .......Yt.B.)...
    fc85080cbbe48ad0 cc8df2af390aa1c2 | ............9...
    96120077c1879d32 aeae7b466dfc48a8 | ...w...2..{Fm.H.
    4a8e9c730d4e4e25 33de18ecca41914e | J..s.NN%3....A.N
    4edd333afcddae77 ab3b5eaf64b50979 | N.3:...w.;^.d..y
.
.
.
    49f83c2029d9a436 9ae2d4ead9eac019 | I.< )..6........
    81b320e59dab099a 3b63ced0b96106b3 | .. .....;c...a..
    8ed9f09a101c9f90 af8a492f8eb50938 | ..........I/...8
    149952982dd8af66 8a8e5ba4f1b8186d | ..R.-..f..[....m
    1fbb7c45f8ba5756 842e5a675c6e7869 | ..|E..WV..Zg\nxi
    dd72032d8c9fa68e 3543066b52f3ea69 | .r.-....5C.kR..i
    e729d91c0769e206 f87e51fdc2e3f216 | .)...i...~Q.....
    5c7ca4a7263f9f86 43b569e8994f1003 | \|..&?..C.i..O..
    9911c98a08128e72 9363cdb0d2e4b40d | .......r.c......
    fc7f95b2e9f90b8b e7cf7f6ed2d7a13f | ...........n...?
    6b8fab5bb5ef930f afb94c3bbf9feedb | k..[......L;....
    e9b7e6dae9f28b37 fe0fadf17277     | .......7....rw
TRACE +0.012 Write 12952 bytes:
    c000112e32a20000 001e320000000000 | ....2.....2.....
    0000000000000000 0078daad7c0b5c13 | .........x..|.\.
    57d6f89d2493213c 343420bad5358280 | W...$.!<44 ..5..
    b2d62a1153b56080 2423f8ac15a95657 | ..*.S.`.$#....VW
    6008c8561e1210ed 96150c03a2c54847 | `..V..........HG
    056bdd45aa62d96f 6d0bdbdda6bb5bcb | .k.E.b.om.....[.
    1b7c151f9f82ba7d 6059a5ee6e176a45 | .|.....}`Y..n.jE
.
.
.
    3b63ced0b96106b3 8ed9f09a101c9f90 | ;c...a..........
    af8a492f8eb50938 149952982dd8af66 | ..I/...8..R.-..f
    8a8e5ba4f1b8186d 1fbb7c45f8ba5756 | ..[....m..|E..WV
    842e5a675c6e7869 dd72032d8c9fa68e | ..Zg\nxi.r.-....
    3543066b52f3ea69 e729d91c0769e206 | 5C.kR..i.)...i..
    f87e51fdc2e3f216 5c7ca4a7263f9f86 | .~Q.....\|..&?..
    43b569e8994f1003 9911c98a08128e72 | C.i..O.........r
    9363cdb0d2e4b40d fc7f95b2e9f90b8b | .c..............
    e7cf7f6ed2d7a13f 6b8fab5bb5ef930f | ...n...?k..[....
    afb94c3bbf9feedb dde9b7e6dae9f28b | ..L;............
    37fe0fadf17277c0                  | 7....rw.
TRACE +0.066 Read 1 bytes: c0
TRACE +0.002 Read 1 bytes: 01
TRACE +0.001 Read 1 bytes: 11
TRACE +0.001 Read 1 bytes: 02
TRACE +0.002 Read 1 bytes: 00
TRACE +0.002 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.002 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: 00
TRACE +0.001 Read 1 bytes: c0
TRACE +0.000 Received full packet: 01110200000000000000
TRACE +0.000 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=00100040
TRACE +0.000 Write 14 bytes: c0000a04000000000000100040c0
TRACE +0.212 Read 1 bytes: c0
TRACE +0.017 Read 1 bytes: 01
TRACE +0.002 Read 1 bytes: 0a
TRACE +3.047 Packet content transfer stopped (received 2 bytes)

A fatal error occurred: Packet content transfer stopped (received 2 bytes)

More Information

Never succeeded and it doesn't stop always within the same step

Other Steps to Reproduce

No response

I Have Read the Troubleshooting Guide

radimkarnis commented 9 months ago

Hello @Z80sp,

857 was a known bug in the stub flasher for ESP32-S3, you are using ESP32-H2, these are not related.

This may be caused by many reasons, one of them being insufficient power supply. Please go over the troubleshooting guide and try the things mentioned. Thanks!

Z80sp commented 9 months ago

Ok, sorry I didn't know they are not related.

Z80sp commented 9 months ago

I already went to the troubleshooting page. The USB port I use works on much more power consuming boards like the ESP32-WROOM-32 type featuring WiFi and 2 LX cores which are not RISC-V.

Z80sp commented 9 months ago

Don't know if that helps, but I just tried to change the target chip to ESP32-C3 and dev board to ESP32-C3-DevKitM-1 and it worked fine:

esptool.py --chip esp32c3 -p /dev/ttyUSB0 -b 115200 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x0 bootloader/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table/partition-table.bin esptool.py v4.7.0 Serial port /dev/ttyUSB0 Connecting.... Chip is ESP32-C3 (QFN32) (revision v0.3) Features: WiFi, BLE, Embedded Flash 4MB (XMC) Crystal is 40MHz MAC: 7c:df:a1:61:ec:1c Uploading stub... Running stub... Stub running... Configuring flash size... Flash will be erased from 0x00000000 to 0x00005fff... Flash will be erased from 0x00010000 to 0x00039fff... Flash will be erased from 0x00008000 to 0x00008fff... Compressed 20576 bytes to 12635... Writing at 0x00000000... (100 %) Wrote 20576 bytes (12635 compressed) at 0x00000000 in 1.5 seconds (effective 110.2 kbit/s)... Hash of data verified. Compressed 169360 bytes to 89535... Writing at 0x00010000... (16 %) Writing at 0x0001a5a9... (33 %) Writing at 0x00020fe0... (50 %) Writing at 0x0002846e... (66 %) Writing at 0x0002edb5... (83 %) Writing at 0x00035efa... (100 %) Wrote 169360 bytes (89535 compressed) at 0x00010000 in 8.3 seconds (effective 163.1 kbit/s)... Hash of data verified. Compressed 3072 bytes to 103... Writing at 0x00008000... (100 %) Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 338.6 kbit/s)... Hash of data verified.

Leaving... Hard resetting via RTS pin... [100%] Built target flash Done

Z80sp commented 9 months ago

Changed back to chip ESP32-H2 and board ESP32-H2-DevKitM-1 in case, but I'm still getting a failure:

esptool.py --chip esp32h2 -p /dev/ttyACM0 -b 115200 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 48m --flash_size 2MB 0x0 bootloader/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table/partition-table.bin esptool.py v4.7.0 Serial port /dev/ttyACM0 Connecting.... Chip is ESP32-H2 (revision v0.1) Features: BLE, IEEE802.15.4 Crystal is 32MHz MAC: 74:4d:bd:ff:fe:60:2b:f7 BASE MAC: 74:4d:bd:60:2b:f7 MAC_EXT: ff:fe Uploading stub... Running stub... Stub running... Configuring flash size... Flash will be erased from 0x00000000 to 0x00005fff... Flash will be erased from 0x00010000 to 0x00035fff... Flash will be erased from 0x00008000 to 0x00008fff... Compressed 21056 bytes to 12830... Writing at 0x00000000... (100 %)

A fatal error occurred: Packet content transfer stopped (received 2 bytes) CMake Error at run_serial_tool.cmake:66 (message):

/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/bin/python;;/mnt/ESP32/opt/Espressif/esp-idf/components/esptool_py/esptool/esptool.py;--chip;esp32h2 failed.

Z80sp commented 9 months ago

It works using extra option --no-stub Do you think it could be something with the stub flasher for ESP32-H2 ?

radimkarnis commented 9 months ago

Do you think it could be something with the stub flasher for ESP32-H2 ?

Yes, it is possible. I suspect the compression to be the issue. Can you try adding the -u option after write_flash and running the command again? This turns off the compression in the stub flasher. Thanks!

Z80sp commented 9 months ago

With compression:

[root@devel-box hello_world]# esptool.py --chip esp32h2 -p /dev/ttyACM0 -b 115000 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 48m --flash_size 2MB 0x0 build/bootloader/bootloader.bin 0x10000 build/hel lo_world.bin 0x8000 build/partition_table/partition-table.bin esptool.py v4.7.0 Serial port /dev/ttyACM0 Connecting... Chip is ESP32-H2 (revision v0.1) Features: BLE, IEEE802.15.4 Crystal is 32MHz MAC: 74:4d:bd:ff:fe:60:2b:f7 BASE MAC: 74:4d:bd:60:2b:f7 MAC_EXT: ff:fe Uploading stub... Running stub... Stub running... Configuring flash size... Flash will be erased from 0x00000000 to 0x00005fff... Flash will be erased from 0x00010000 to 0x00035fff... Flash will be erased from 0x00008000 to 0x00008fff... Compressed 21056 bytes to 12831... Wrote 21056 bytes (12831 compressed) at 0x00000000 in 0.4 seconds (effective 480.7 kbit/s)... Hash of data verified. Compressed 153552 bytes to 81408... Writing at 0x00019af8... (40 %)Traceback (most recent call last): File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/init.py", line 1139, in _main main() File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/init.py", line 923, in main operation_func(esp, args) File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/cmds.py", line 598, in write_flash esp.flash_defl_block(block, seq, timeout=timeout) File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/loader.py", line 131, in inner return func(*args, **kwargs) File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/loader.py", line 1077, in flash_defl_block self.check_command( File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/loader.py", line 467, in check_command val, data = self.command(op, data, chk, timeout=timeout) File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/loader.py", line 436, in command p = self.read() File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/loader.py", line 369, in read return next(self._slip_reader) StopIteration

A fatal error occurred: The chip stopped responding.

Z80sp commented 9 months ago

Without compression (option -u):

[root@devel-box hello_world]# esptool.py --chip esp32h2 -p /dev/ttyACM0 -b 115000 --before=default_reset --after=hard_reset write_flash -u --flash_mode dio --flash_freq 48m --flash_size 2MB 0x0 build/bootloader/bootloader.bin 0x10000 build/hello_world.bin 0x8000 build/partition_table/partition-table.bin esptool.py v4.7.0 Serial port /dev/ttyACM0 Connecting... Chip is ESP32-H2 (revision v0.1) Features: BLE, IEEE802.15.4 Crystal is 32MHz MAC: 74:4d:bd:ff:fe:60:2b:f7 BASE MAC: 74:4d:bd:60:2b:f7 MAC_EXT: ff:fe Uploading stub... Running stub... Stub running... Configuring flash size... Flash will be erased from 0x00000000 to 0x00005fff... Flash will be erased from 0x00010000 to 0x00035fff... Flash will be erased from 0x00008000 to 0x00008fff... Writing at 0x00004000... (100 %)Traceback (most recent call last): File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/init.py", line 1139, in _main main() File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/init.py", line 923, in main operation_func(esp, args) File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/cmds.py", line 609, in write_flash esp.flash_block(block, seq) File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/loader.py", line 872, in flash_block self.check_command( File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/loader.py", line 467, in check_command val, data = self.command(op, data, chk, timeout=timeout) File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/loader.py", line 436, in command p = self.read() File "/opt/Espressif/IDF-TOOLS/python_env/idf5.1_py3.9_env/lib/python3.9/site-packages/esptool/loader.py", line 369, in read return next(self._slip_reader) StopIteration

A fatal error occurred: The chip stopped responding.

Z80sp commented 9 months ago

With option --no-stub:

[root@devel-box hello_world]# esptool.py --chip esp32h2 -p /dev/ttyACM0 -b 115000 --no-stub --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 48m --flash_size 2MB 0x0 build/bootloader/bootloader.bin 0x10000 build/hello_world.bin 0x8000 build/partition_table/partition-table.bin esptool.py v4.7.0 Serial port /dev/ttyACM0 Connecting... Chip is ESP32-H2 (revision v0.1) Features: BLE, IEEE802.15.4 Crystal is 32MHz MAC: 74:4d:bd:ff:fe:60:2b:f7 BASE MAC: 74:4d:bd:60:2b:f7 MAC_EXT: ff:fe Enabling default SPI flash mode... Configuring flash size... Flash will be erased from 0x00000000 to 0x00005fff... Flash will be erased from 0x00010000 to 0x00035fff... Flash will be erased from 0x00008000 to 0x00008fff... Erasing flash... Took 0.19s to erase flash block Wrote 21504 bytes at 0x00000000 in 0.2 seconds (708.8 kbit/s)... Hash of data verified. Erasing flash... Took 0.75s to erase flash block Wrote 153600 bytes at 0x00010000 in 1.6 seconds (747.1 kbit/s)... Hash of data verified. Erasing flash... Took 0.03s to erase flash block Wrote 3072 bytes at 0x00008000 in 0.0 seconds (851.5 kbit/s)... Hash of data verified.

Leaving... Hard resetting via RTS pin...

radimkarnis commented 9 months ago

Thank you, so it is not the compression.

Could you share your binaries (build/bootloader/bootloader.bin, build/hello_world.bin, build/partition_table/partition-table.bin)? I will try to reproduce this locally. Thank you

Z80sp commented 9 months ago

Sure! Here's the archive:

[root@devel-box hello_world]# tar --gzip -tf hello_world.tar.gz build/hello_world.bin build/bootloader/bootloader.bin build/partition_table/partition-table.bin

[root@devel-box hello_world]# md5sum hello_world.tar.gz b37a718c61d1cd52c8586ff9d6c9dcf0 hello_world.tar.gz

hello_world.tar.gz

radimkarnis commented 9 months ago

Hi @Z80sp, thank you for the binaries.

I am trying to reproduce this, but without any luck:

esptool.py -p /dev/tty.usbmodem111301 --baud 115200 --before default_reset --after hard_reset --chip esp32h2 write_flash --flash_mode dio --flash_size 2MB --flash_freq 48m 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/hello_world.bin

esptool.py v4.7.0
Serial port /dev/tty.usbmodem111301
Connecting...
Chip is ESP32-H2 (revision v0.1)
Features: BLE, IEEE802.15.4
Crystal is 32MHz
MAC: 60:55:f9:ff:fe:f7:3e:51
BASE MAC: 60:55:f9:f7:3e:51
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00010000 to 0x00035fff...
Compressed 21056 bytes to 12831...
Wrote 21056 bytes (12831 compressed) at 0x00000000 in 0.3 seconds (effective 594.7 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 557.8 kbit/s)...
Hash of data verified.
Compressed 153552 bytes to 81408...
Wrote 153552 bytes (81408 compressed) at 0x00010000 in 1.0 seconds (effective 1287.1 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Flashing always succeeds. This could be related to your OS drivers or your environment in general. I am not sure if we want to go deeper into this. Do you consider the --no-stub option to be a acceptable workaround for now?

dobairoland commented 9 months ago

Works for me as well on Linux:

 esptool.py --chip esp32h2 -p /dev/ttyACM0 --before=default_reset --after=hard_reset write_flash -u --flash_mode dio --flash_freq 48m --flash_size 2MB 0x0 build/bootloader/bootloader.bin 0x10000 build/hello_world.bin 0x8000 build/partition_table/partition-table.bin
esptool.py vv4.8.dev1
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-H2 (revision v0.1)
Features: BLE, IEEE802.15.4
Crystal is 32MHz
MAC: 60:55:f9:ff:fe:f7:3e:51
BASE MAC: 60:55:f9:f7:3e:51
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00005fff...
Flash will be erased from 0x00010000 to 0x00035fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Wrote 32768 bytes at 0x00000000 in 0.3 seconds (924.8 kbit/s)...
Hash of data verified.
Wrote 163840 bytes at 0x00010000 in 1.0 seconds (1366.1 kbit/s)...
Hash of data verified.
Wrote 16384 bytes at 0x00008000 in 0.1 seconds (1616.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
dobairoland commented 9 months ago

I'm guessing based on Python 3.9.0 that you use some older version of Linux distribution. Are you able to upgrade? Or try to flash through UART until you can upgrade.

radimkarnis commented 8 months ago

I believe this is a local environment issue, as it cannot be reproduced on our side. I am closing this issue for this reason and inactivity.