espressif / esptool-js

Javascript implementation of flasher tool for Espressif chips, running in web browser using WebSerial.
https://espressif.github.io/esptool-js/
Apache License 2.0
288 stars 108 forks source link

Flash error with ESP32-C3 via USB_SERIAL_JTAG: Timeout #41

Closed Jason2866 closed 1 year ago

Jason2866 commented 2 years ago
esptool.js v0.1-dev
Serial port WebSerial VendorID 0x303a ProductID 0x1001
Connecting....
Detecting chip type... ESP32-C3
Chip is ESP32-C3 (revision 3)
Features: Wi-Fi
Crystal is 40MHz
MAC: 84:f7:03:a0:ee:ec
Uploading stub...
Running stub...
Error: Timeout
Compressed 2209028 bytes to 1330626...

Screenshot from Chrome Console

Bildschirmfoto 2022-08-11 um 11 00 55

@balloob fyi

Jason2866 commented 2 years ago

When using Tasmota WebInstaller which uses esp-web-flasher under the hood flashing does work.

Bildschirmfoto 2022-08-11 um 11 08 34
balloob commented 2 years ago

Maybe the C3 stub is incorrect and so gets stuck once written to RAM https://github.com/espressif/esptool-js/blob/main/targets/esp32c3.js

brentru commented 2 years ago

Having the same issue with ESP32-C3. Bumping for visibility.

liux-pro commented 1 year ago

same issue

TD-er commented 1 year ago

Related? https://github.com/espressif/esptool-js/pull/54

Jason2866 commented 1 year ago

@brianignacio5 Can you implement in your PR?

igrr commented 1 year ago

This should be now fixed by #54, thanks @liux-pro!

liux-pro commented 1 year ago

This should be now fixed by #54, thanks @liux-pro!

@igrr still not fixed, exactly the same issue as @Jason2866 esp32c3 via build-in usb jtag image

igrr commented 1 year ago

I thought I tested the final merge commit on both C3 with USB_SERIAL_JTAG and CP2102, but looks like I didn't.

Updating the stub binary seems to solve the issue. I'll do more checks with different boards and open a PR.

igrr commented 1 year ago

@liux-pro may I ask you to try https://github.com/espressif/esptool-js/pull/65 and see if that fixes the issue on your end? I've only updated the stub binary for ESP32-C3 there.

liux-pro commented 1 year ago

@liux-pro may I ask you to try #65 and see if that fixes the issue on your end? I've only updated the stub binary for ESP32-C3 there.

Fully functional !

Jason2866 commented 1 year ago

Confirmed working with PR #65 Good for release when debugging Infos #63 are removed.

igrr commented 1 year ago

65 has been merged, hopefully this is fixed for good!