-->
Page 1 of 1

howto reset esp8266 flash after save a wrong js code?

PostPosted: Sun Oct 18, 2015 6:05 am
by hygy
Hi,

I saved an espruino js code to esp8266 but it is always reset, and I cannot save a working js code. How can I make it work again?

I re flashed with esptool, but the saved flash content isnt changed. :(

thanks
HyGy

Re: howto reset esp8266 flash after save a wrong js code?

PostPosted: Sun Oct 18, 2015 9:21 am
by hygy
What is the correct way to clear this part of the flash?

Now i successfully cleared. But I think this is not the "beauty" way. I reflashed the original NODEMCU flash bin:

./esptool -bm qio -bz 512K -bf 40 -cp /dev/ttyUSB0 -cb 115200 -cd nodemcu -ca 0x00000 -cf nodemcu_float_0.9.6-dev_20150704.bin

than flash back the new espruino flash:

./esptool -bm qio -bz 512K -bf 40 -cp /dev/ttyUSB0 -cb 115200 -cd nodemcu -ca 0x00000 -cf espruino_esp8266_board_0x00000.bin -ca 0x10000 -cf espruino_esp8266_board_0x10000.bin

Re: howto reset esp8266 flash after save a wrong js code?

PostPosted: Sun Oct 18, 2015 10:59 am
by kolban
Howdy @hygy,
There is a tracked issue on this puzzle ... see:

https://github.com/espruino/Espruino/issues/661

You and everyone else are more than welcome to provide comments and notions on ideas.

Re: howto reset esp8266 flash after save a wrong js code?

PostPosted: Wed Oct 21, 2015 12:48 pm
by Erni
Now I have just been hit by this problem.
Two of my ESP's was partly dead, I got a reset every time I tried to upload new JS.
I tried some of the method mentioned: flashing Nodemcu bin, uploading sketch via ESP-Arduino, and witing blank.bin to 0x7C000, but nothing helped.

The solution was as nkolban sugested to use esptool to erase flash:

Code: Select allpython esptool.py -p com6 erase_flash


Now everything is back to normal :D