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
276 stars 108 forks source link

Use stubs from esp-flasher-stub project #103

Open igrr opened 1 year ago

igrr commented 1 year ago

esp-flasher-stub project is dual-licensed licensed under MIT and Apache 2.0. Using the stubs from that project can help remove the dependency on the GPL-licensed stubs from esptool.py.

As part of this task, make sure that the overall flashing performance doesn't regress significantly when switching to esp-flasher-stub project.

TODO:

Jellepepe commented 1 month ago

I will add to this that the currently used flasher stub for the ESP32-C6 does not seem to be fully functional. I was unable to change baudrate (Timeout on read after sending the command). Additionally I ran into issues flashing updates when loading into download mode through the RTS/DTR procedure on the internal JTAG/Serial usb peripheral. (though it worked when manually loading into download mode using gpio) It would upload the Stub and read registers just fine, but fail to enter flashing mode (again timeout on read, no response)

After a lot of debugging I changed to using the stub from esp-flasher-stub which fixed both of these issues fully.

This should be a question of only replacing the .json files or simply linking to the other repository, I'm happy to submit a pull request for this as well if needed.