You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into a problem where erase_flash was throwing a timeout, but it's supposed to be a timeout of 120000 and it felt like it was immediate.
Investigating with the debugger, it seems like the call const {value, done} = await reader.read(); was making done equal true on the very first call.
Going back a bit, the thing that happens before sending the erase flash command is main_fn finishing up with a call to change_baud.
At the bottom of change_baud, there's a line that says await this.transport.rawRead({timeout:500}); that has no purpose that I can think of, there's no code comments
Disabling that line await this.transport.rawRead({timeout:500}); will fix the timeout problem.
Another solution is to simply not call change_baud ever, and use baud rate 115200, equaling rom_baudrate, so the change is redundant anyways
I hope somebody finds this useful and maybe the code logic gets changed a bit in a release.
I am wondering if this will help the fellas in this issue #96
NOTE: using https://espressif.github.io/esptool-js/ never has this problem but that doesn't mean the problem doesn't exist, it's likely some sort of timing/threading issue, perhaps due to inclusion or absence of xterm. We should aim for a solution that works on all platforms of all variations, not just ignoring an issue because one demo works.
The text was updated successfully, but these errors were encountered:
I ran into a problem where
erase_flash
was throwing a timeout, but it's supposed to be a timeout of 120000 and it felt like it was immediate.Investigating with the debugger, it seems like the call
const {value, done} = await reader.read();
was makingdone
equal true on the very first call.Going back a bit, the thing that happens before sending the erase flash command is
main_fn
finishing up with a call tochange_baud
.At the bottom of
change_baud
, there's a line that saysawait this.transport.rawRead({timeout:500});
that has no purpose that I can think of, there's no code commentsDisabling that line
await this.transport.rawRead({timeout:500});
will fix the timeout problem.Another solution is to simply not call
change_baud
ever, and use baud rate 115200, equalingrom_baudrate
, so the change is redundant anywaysI hope somebody finds this useful and maybe the code logic gets changed a bit in a release.
I am wondering if this will help the fellas in this issue #96
NOTE: using https://espressif.github.io/esptool-js/ never has this problem but that doesn't mean the problem doesn't exist, it's likely some sort of timing/threading issue, perhaps due to inclusion or absence of xterm. We should aim for a solution that works on all platforms of all variations, not just ignoring an issue because one demo works.
The text was updated successfully, but these errors were encountered: