Comments (12)
I can't say I have seen this error before but I'll look into it. There's some changes in the pipeline that I'll try to publish soon :)
from esptool.
Exactly the same thing also happens for me. The update always runs smoothly, but I get this error.
Maybe this is related to the fact that I'm using an esp8266EX instead of the non-EX variant?
from esptool.
0ff i am able to upload the wi07c.rom to a EX without issues but the stuff coming from the compiler in the vm i am not able to upload
from esptool.
Oh, you have to write both the .output/eagle/debug/image/eagle.app.v6.flash.bin
(dest=0x0
) AND the .output/eagle/debug/image/eagle.app.v6.irom0text.bin
(dest=0x40000
) to the module, then it works fine :)
You might need to reboot the module between the two files.
from esptool.
check
from esptool.
oke i can indeed confirm that it work
from esptool.
I can confirm this issue.
Just recently installed the SDK using this tutorial: https://github.com/esp8266/esp8266-wiki/wiki
Within the Makefile the code is as follows:
flash: firmware/0x00000.bin firmware/0x40000.bin
-$(ESPTOOL) --port $(ESPPORT) write_flash 0x00000 firmware/0x00000.bin
sleep 3
-$(ESPTOOL) --port $(ESPPORT) write_flash 0x40000 firmware/0x40000.bin
make flash has the following output (always, not from time to time):
/home/sid/esp8266/esptool/esptool.py --port /dev/ttyUSB0 write_flash 0x00000 firmware/0x00000.bin
Connecting...
Erasing flash...
Writing at 0x00000000... (0 %)
Writing at 0x00000400... (3 %)
[...]
Writing at 0x00007800... (93 %)
Writing at 0x00007c00... (96 %)
Leaving...
Traceback (most recent call last):
File "/home/sid/esp8266/esptool/esptool.py", line 351, in <module>
esp.flash_finish(False)
File "/home/sid/esp8266/esptool/esptool.py", line 188, in flash_finish
raise Exception('Failed to leave Flash mode')
Exception: Failed to leave Flash mode
make: [flash] Error 1 (ignored)
sleep 3
/home/sid/esp8266/esptool/esptool.py --port /dev/ttyUSB0 write_flash 0x40000 firmware/0x40000.bin
Traceback (most recent call last):
Connecting...
File "/home/sid/esp8266/esptool/esptool.py", line 299, in <module>
esp.connect()
File "/home/sid/esp8266/esptool/esptool.py", line 136, in connect
raise Exception('Failed to connect')
Exception: Failed to connect
make: [flash] Error 1 (ignored)
It does not seem to leave the flash mode correctly. From that point on, I can not upload code anymore until the next power circle (or reset I suppose).
However, there is a trick: If I manage to do a power circle within the 3 second sleep then the program uploads fine (although the errors appear) and the program works.
Any ideas how I can circumvent this hack?
Note that, I also got the EX version of the chip. And I also tried to upload the original firmware, resulting in the same issue.
from esptool.
i have this exact same problem on a v1 (00160901) board, it was running ok accepting AT commands until i used esptool.py, now it seems stuck in flash mode as it won't accept AT commands and returns gibberish and then "ready" on boot.
power cycling makes no difference and the only way to get to the 2nd flash is to power cycle in the sleep(3) bit, but it still doesn't actually complete:
$ esptool.py --port /dev/ttyUSB0 write_flash 0x00000 firmware/0x00000.bin
Connecting...
Erasing flash...
Writing at 0x00008400... (97 %)
Leaving...
Traceback (most recent call last):
File "esptool.py", line 351, in <module>
esp.flash_finish(False)
File "esptool.py", line 188, in flash_finish
raise Exception('Failed to leave Flash mode')
Exception: Failed to leave Flash mode
Makefile:139: recipe for target 'flash' failed
make: [flash] Error 1 (ignored)
sleep 3
esptool.py --port /dev/ttyUSB0 write_flash 0x40000 firmware/0x40000.bin
Connecting...
Erasing flash...
Writing at 0x00063c00... (99 %)
Leaving...
Traceback (most recent call last):
File "esptool.py", line 351, in <module>
esp.flash_finish(False)
File "esptool.py", line 188, in flash_finish
raise Exception('Failed to leave Flash mode')
Exception: Failed to leave Flash mode
Makefile:139: recipe for target 'flash' failed
make: [flash] Error 1 (ignored)
from esptool.
Hi,
I forked the project and extended it so that you do not need to power cycle manually. No more reset and bootloader buttons are required. U only need two more wires.
Check it out: https://github.com/3s1d/esp_prog
Juergen
from esptool.
I experienced the same problem.
Erasing flash...
Writing at 0x00008400... (97 %)
Leaving...
Traceback (most recent call last):
File "esptool.py", line 353, in <module>
esp.flash_finish(False)
File "esptool.py", line 190, in flash_finish
raise Exception('Failed to leave Flash mode')
Exception: Failed to leave Flash mode
Put a print statement in the code, and the command(ESPROM.ESP_FLASH_END, ...)
method returned:
(538052359, '\x01\x06')
from esptool.
#5 fixes this properly (based on several independent reports of '\x01\x06' being returned).
from esptool.
merged #5
from esptool.
Related Issues (20)
- Unsupported Command Errors when attempting to use esptools to flash esp8266 chip using a Windows PC (ESPTOOL-840) HOT 6
- Can't reboot device using USB Serial JTAG when in DOWNLOAD_MODE (ESPTOOL-842) HOT 25
- esptool: error: unrecognized arguments: --force --encrypt (ESPTOOL-843) HOT 5
- Esptool tool always fail at the connecting stage but AT+GMR command returns chip data (ESPTOOL-844) HOT 7
- Can't Flash ESP32-S2 on Mac (ESPTOOL-846) HOT 3
- Intelhex check can prevent flashing of binary file. (ESPTOOL-855) HOT 1
- A fatal error occurred: Invalid head of packet (0x6F) (ESPTOOL-858) HOT 8
- Important fatal errors should print to stderr (ESPTOOL-863) HOT 1
- espefuse.py show struct.error: unpack requires a buffer of 20 bytes (IDFGH-12938) (ESPTOOL-867) HOT 3
- Invalid head of packet (0x45): Possible serial noise or corruption...ESP32-C3-MINI (ESPTOOL-872) HOT 20
- intelhex.HexRecordError: Hex file contains invalid record, when not using hex-files (ESPTOOL-875) HOT 2
- Add ability to specify serial port VID+PID (ESPTOOL-877)
- Cannot run esptool.py on macOS Sonoma, No module named 'serial'... (ESPTOOL-880) HOT 1
- Sign/notarize macOS executable (ESPTOOL-881)
- Don't use self-hosted builders (ESPTOOL-882) HOT 3
- Unable to install on airgapped machine with new python and pip installation (ESPTOOL-884) HOT 3
- ELFSection check missing in bin_image (ESPTOOL-888) HOT 1
- SystemExit Raised Instead of Warning in _check_if_can_reset Method when chip is placed into download mode using GPIO0 (ESPTOOL-893)
- esptools cannot connect to ESP32-C3-WROOM-02 "no serial data received" (ESPTOOL-900) HOT 3
- flash write fails with ambiguous Error 1 (ESPTOOL-901) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esptool.