-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read boot header for better error messages (ESPTOOL-87) #27
Comments
This seems like a really interesting idea, but I'm not sure exactly how it would work. Do you mean we scan the output for the ROM boot mode string, and then if we see it then we can parse out and give an intelligent "your GPIO0 line is high" type error message? The only problem I see is that esptool.py doesn't usually operate at the oddball 74800 baud rate, the default is 115200 and most people run even faster than this. In fact only about 30% of the adapters I have at hand can even use that baud rate (FT2232R can but cp2102, ch341 and avr usbserial all can't.) So I think it would be tricky to parse this out while also trying to operate at a higher rate. Or am I misunderstanding how it would work? |
@projectgus I think that he suggest to open the connection at 74800 and once it gets the bootloader response, change the speed to 115200 (or whatever speed you want) |
I’m closing this issue because it has been inactive for a few months and it seems like it's not relevant anymore. Please reopen if further discussion is needed. |
So the ESP8266 outputs a boot header at 77400 baud containing something like:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
According to https://github.com/esp8266/esp8266-wiki/wiki/Boot-Process#esp-boot-modes the first value in the boot mode is interesting.
If, after reset, we encounter a boot mode that isn't 1, it's possible to raise an error there and tell the user the board was not put in to flash mode.
The text was updated successfully, but these errors were encountered: