-
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
Can't flash with stub when device in deep sleep #351
Comments
@igrr Ivan, maybe you can help Angus with this by bringing in the expertise of the esptool-ck maintainer. |
@marcelstoer do you see this behavior with any common board, e.g. NodeMCU? |
That was next on my list anyhow but yes, I can reproduce this on a NodeMCU V2/1.0. |
@igrr / @projectgus is there anything I can do to make your life easier in reproducing and fixing this? Is there any further information I could provide? Any chance to get a fix for this soonish? |
I think I have pretty much confirmed this is my problem too, but up until a couple of weeks ago I had been flashing deep sleep enabled code with no problem. I can also add that the nodemcu flasher also works every time, but the Espressif GUI based flash tool has the same issue as esptool. |
@marcelstoer Thanks for being patient while one of us got to this. I was able to reproduce and create a test case (see commit) so I'm pretty sure this is fixed now, but please ping if you're still experiencing problems. |
The few tests were successful, thanks. Do you have an ETA for the upcoming release? |
@marcelstoer Awesome! This week, I hope. |
Necessary if the ESP8266 has been woken from deep sleep, when SPI flash is still powered down. Closes espressif/esptool#351 Probably also the fix for espressif/esptool#380
Condensed version of earlier discussions.
!! The device is in deep sleep (the previously loaded app triggered this) when the flash process started. Flash mode is enabled, though. !!
Full esptool.py command line as run:
esptool.py --port /dev/cu.SLAB_USBtoUART --baud 921600 write_flash --flash_size 2MB --flash_mode qio 0x00000 myapp.ino.bin
Full output from esptool.py
What is the expected behaviour?
Binary flashed to device.
Do you have any other information from investigating this?
Enabling trace mode shows these few lines before the process aborts:
Is there any other information you can think of which will help us reproduce this problem?
It works with esptool-ck
Uploading from within Arduino IDE has never been an issue. esptool-ck is a bit slow but other than that pretty reliable. It even uploads the binary when the device is in deep sleep.
It works w/o the stub
esptool.py --port /dev/cu.SLAB_USBtoUART --baud 921600 --no-stub write_flash ...
is a workaround - a slow one, though:Fine w/o deep sleep
To work around this you need to unplug USB, replug it, and then put the device into flash mode before the currently loaded app can run and put it into deep sleep.
Flash settings make no difference
I tried Python 2.7/3.6, different esptool.py version, different baud rates, different flash modes, auto-flash size on/off - the behavior is consistent.
The text was updated successfully, but these errors were encountered: