Esp8266 erase flash.

Posted on
  • After endless problems, did the clear memory (erase flash). Worked through the program: flash download tools v3.6.3.
    Then I uploaded the firmware. The module is triggered. Save() and Reset() work. After I do, lit a blue light, and the module does not connect. What does the function Is there a problem?

    1 Attachment

    • ERASE.jpg
  • After flashing to 512kb

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
     1v95 Copyright 2017 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    Flash map 512KB:256/256, manuf 0xe0 chip 0x4016
    WARNING: *** Your flash chip does not match your flash map ***
      { "addr": 487424, "length": 4096 }
 - works

  • Try using the files in this directory


    not this directory


    You might want to switch to (Linux or windows)
    I used to use the ExpressIF tool but switched to because I can use batch files to do the flashing in a few mouse clicks:

    Using Batch Files to Flash

    How to get

    some info

    One gotcha is the ExpressIF tool flash size is given in bits, uses bytes.

    Which ESP8266 chip are you trying to flash?

  • esp12f

    1 Attachment

    • TB2IjHPfXXXXXcoXpXXXXXXXXXX_!!882680026.jpg
  • ESP12F.
    Tried the same module, to erase the memory and overwrite, the problem remained.

  • 0x000000 0 4KB Bootloader with flash type/size header
    0x001000 4KB 468KB Espruino firmware, first partition
    0x076000 472KB 4KB SDK RF calibration save area on 512KB modules
    0x077000 476KB 4KB EEPROM emulation
    0x078000 480KB 12KB Espruino save() area
    0x07B000 492KB 4KB Espruino system and wifi settings
    0x07C000 496KB 16KB 512KB flash: Espressif SDK system params, else unused
    0x080000 512KB 4KB SDK RF calibration save area on 1MB and larger modules
    0x081000 516KB 472KB Espruino firmware, second partition
    0x0F7000 988KB 4KB Unused
    0x0F8000 992KB 16KB Unused
    0x0FC000 996KB 16KB 1MB flash: Espressif SDK system params, else unused
    0x100000 1MB approx 1MB-3MB flash unused on 2MB-4MB modules
    0x1FC000 2032KB 16KB 2MB flash: Espressif SDK system params, else unused
    0x3FC000 4080KB 16KB 4MB flash: Espressif SDK system params, else unused

    I think I deleted all the data from memory.
    How can I recover them?

    For firmware ESP12F on 4mb I used nodemcu flasher. Since using esp flash download tool ESP12F on 4mb is recorded and does not work at all. Esp flash download tool records only at 512kb.

  • I just flashed the same type of chip using this batch file a couple of days ago.

    :: Flash ESP8288-12 4MB chip with Espruino
    :: CD C:\Users\jj\Documents\espruinoEsp8266Fla­sh\espruino_1v95_esp8266
    set /p pport=Enter a Com port 
    echo %pport%
    pause --port %pport% --baud 115200 write_flash --flash_freq 40m --flash_mode qio --flash_size 4MB 0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0x3FC000 esp_init_data_default.bin 0x3FE000 blank.bin
    :: To flash a 4MB esp8266 (e.g. esp-12) using the serial port use:
    :: --port [/dev/ttyUSB0|COM1] --baud 115200 write_flash \
    ::  --flash_freq 80m --flash_mode qio --flash_size 32m \
    ::  0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin \
    ::  0x3FC000 esp_init_data_default.bin 0x3FE000 blank.bin

    Give that a try.
    If you get Espruino up and running then in the left window of WebIDE try to following commands:


    and then


  • process.env
      "VERSION": "1v95",
      "BUILD_DATE": "Dec 15 2017",
      "BUILD_TIME": "17:10:27",
      "GIT_COMMIT": "7dbffcf5da09570bd95714b2386a12ab25ab1d5­0",
      "BOARD": "ESP8266_4MB",
      "CHIP": "ESP8266",
      "CHIP_FAMILY": "ESP8266",
      "FLASH": 0, "RAM": 81920,
      "SERIAL": "6001943c-9f1e",
      "CONSOLE": "Serial1",
      "EXPORTS": { "jsvLock": 1075854228, "jsvLockAgainSafe": 1075854316, "jsvUnLock": 1075854940, "jsvSkipName": 1075864796,
        "jsvMathsOp": 1075871204, "jsvMathsOpSkipNames": 1075872992, "jsvNewFromFloat": 1075862156, "jsvNewFromInteger": 1075862040, "jsvNewFromString": 1075861816,
        "jsvNewFromBool": 1075862124, "jsvGetFloat": 1075868928, "jsvGetInteger": 1075864092, "jsvGetBool": 1075869304, "jspeiFindInScopes": 1075887224,
        "jspReplaceWith": 1075886908, "jspeFunctionCall": 1075898260, "jspGetNamedVariable": 1075889136, "jspGetNamedField": 1075889580, "jspGetVarNamedField": 1075889712,
        "jsvNewWithFlags": 1075861420 }
  • After downloading the 4mb memory module works. I cannot auto reconnect after downloading the code via the console and reboot the console. Reconnect only works manually. And when I give the command () esp12f die completely.

    1 Attachment

    • Node.jpg
  • The issue with happens when you use flashsize 4MB or 32m - on 4MB flash, you need to do 4MB-c1 or 32m-c1

    The readme needs to be corrected.

  • The issue with happens when you use flashsize 4Mb on 4MB flash.
    After a full clean flash ESP12F.

  • If flashing files from espruino_1v95_esp8266_4mb than --flash_size 4MB-c1 or --flash_size 32m-c1 is a must, because wifi save page location is flash map dependent!

    @DrAzzy created PR for README_flash.txt

  • Ie can be I'm downloading 4mb to 32mb, in this bug?

  • Yes, if you did this: flash espruino_1v95_esp8266_4mb with --flash_size 4MB

  • Well, tomorrow I will try to fix it, thanks

  • Finally got to flash. Thanks for the help! Looks firmware so:

    1 Attachment

    • ESP12F.jpg
  • Well, you can make this more speedy:
    use spi speed 80, spi mode qio and baud 460800

  • Great!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Esp8266 erase flash.

Posted by Avatar for Alexander @Alexander