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

ESP8266/8285 support #20

Closed pkendall64 closed 2 years ago

pkendall64 commented 2 years ago

Adds support for ESP8266 and 8285 chips.

The stub for the ESP8266 has come from esptool.py version 3.0. This can be updated if required.

There are a few issues I found in the webserial.js code that have been fixed. The most problematic is that the read would read more than one packet from the serial port and the slip reader would just return the first packet it found and drop the rest. I have changed this to save the remainder away for the next call to read to prepend onto the front and then be processed by the next call to the slip reader.

balloob commented 2 years ago

Your code seems to contain some other unrelated fixes to ESP8266. Could you break those out and open separate new PRs for those.

The branch gh-pages was just merged into main (#18) and so this PR needs to target main now.

pkendall64 commented 2 years ago

I have pulled all the other code out and will make seperate PRs for them.

balloob commented 2 years ago

@pkendall64 we've split out the chip info/stubs into a new targets folder. Can you follow the same pattern for ESP8266.

pkendall64 commented 2 years ago

main merged into this branch and tested

balloob commented 2 years ago

I talked to Espressif. They want to do some extra testing before this can be merged. Want to make sure the other chips are not breaking.

pkendall64 commented 2 years ago

I talked to Espressif. They want to do some extra testing before this can be merged. Want to make sure the other chips are not breaking.

Yeah, I have no problem with that. I have tested ESP8266, ESP8285, ESP32 and ESP32-PICO-D4 boards as thats all I have.

balloob commented 2 years ago

Errors are now raised instead of being logged and this PR needs rebasing.

pkendall64 commented 2 years ago

Merged main and changed log to throw.

balloob commented 2 years ago

Could you resolve the merge conflicts?

pkendall64 commented 2 years ago

Could you resolve the merge conflicts?

Sure thing. Done.