Also before flashing, its a good idea to erase the firmware entirely. I use something like:
esptool.py --port [insert_port_here] erase_flash
if you're using esptool. I noticed that the ESP32 was more sensitive to this issue (requiring the flash to be erased before uploading the firmware) than the ESP8266.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Also before flashing, its a good idea to erase the firmware entirely. I use something like:
if you're using esptool. I noticed that the ESP32 was more sensitive to this issue (requiring the flash to be erased before uploading the firmware) than the ESP8266.