-->
Page 1 of 2

Firmware flash keeps crashing around 99%

PostPosted: Wed Nov 09, 2016 7:12 pm
by Lawmate
Hi, I'm new to using the ESP module, so please forgive and silly questions.

I have an ESP01 connected to an FTDI232 board, the same as lots of tutorials recommend. I built a firmware at nodemcu-build.com and downloaded the integer and float files as well as esp_init_data_default.bin and have run the following command
Code: Select allesptool.py --port /dev/tty.usbserial-A50285BI write_flash 0x00000 nodemcu-master-10-modules-2016-11-09-21-20-59-float.bin 0x3fc000 esp_init_data_default.bin

It seems to transfer OK until it gets to the bit where it says Writing at 0x00080000. It always finished abruptly at the point with the message Exception: Failed to write to target Flash. For the integer file, this is always at 99% and for the float it is always at 97%

Does anyone have any idea what I'm doing wrong? I have tried changing the baud rate, the dio/qio setting, ect, to no avail.

Any suggestions welcome.

Thanks

Re: Firmware flash keeps crashing around 99%

PostPosted: Thu Nov 10, 2016 2:10 am
by marcelstoer
Worth checking whether your ESP-01 has 512kB flash or 1MB. We're discussing issues around that in https://github.com/nodemcu/nodemcu-firmware/pull/1587

Re: Firmware flash keeps crashing around 99%

PostPosted: Thu Nov 10, 2016 5:10 am
by Lawmate
Hi

Thanks for the reply. I tried flashing it without entering any size parameters but it still does the same thing. Below is what I get every time I try to flash it, sort of regardless of what parameters I try.

Erasing flash...
Writing at 0x00080000... (97 %)
Traceback (most recent call last):
File "/usr/local/bin/esptool.py", line 5, in <module>
pkg_resources.run_script('esptool==0.1.0', 'esptool.py')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 742, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 1674, in run_script
exec(script_code, namespace, namespace)
File "/Library/Python/2.7/site-packages/esptool-0.1.0-py2.7.egg/EGG-INFO/scripts/esptool.py", line 536, in <module>

File "/Library/Python/2.7/site-packages/esptool-0.1.0-py2.7.egg/EGG-INFO/scripts/esptool.py", line 196, in flash_block

Exception: Failed to write to target Flash

Also, on another note, as for holding GPIO0 low on startup, does that mean hold it low when you first give it power, then disconnect it from GND, then flash the device, or should I keep it low the whole time it is to be flashed?

Thanks

Re: Firmware flash keeps crashing around 99%

PostPosted: Fri Nov 11, 2016 1:16 am
by marcelstoer
Lawmate wrote:File "/Library/Python/2.7/site-packages/esptool-0.1.0-py2.7.egg


Does that mean your esptool.py version is 0.1.0? You need v1.2+ for auto-size detection: https://github.com/espressif/esptool/releases