loading

In this Instructable I'll show you how to flash the AT-Firmware on the ESP8266 ESP-12F Module.

For the hardware part you should check my ESP-12F ESP8266 Minimal Breadboard for Flashing.

I'll use here the official Espressif Flash tool in order to flash the Ai-Thinker Command Firmware and the Espressif AT Firmware.

Step 1: Install Flash Tool and First Run

The Espressif website had changed. You can find the Flash Tool now on Espressif Ressources page : https://espressif.com/en/products/hardware/esp8266ex/resources

I also put a copy here: https://github.com/flav1972/esp8266_ressources/tree/master/tools

Download the Flash Download Tools V3.4.4 (flash_download_tools_v3.4.4.zip).

  • Unzip it and run: ESPFlashDownloadTool_v3.4.4.exe
  • A text window will open and also a graphical UI.

Watch the text window for messages.

  • On the UI select ESP Download Tool.

The interface will open.

  • Select your right COM port.
  • Set Speed to 230400.
  • Keep the other info like on the screen capture

Step 2: First Connection to ESP82666

Press START on the UI.

Keep "FLASH botton" on the breadboard

When the text window shows "Connecting..." quickly press and release "RESET button" while keeping the FLASH button pressed.

You can try this several times in order to get the right timing. The text window will show "Connecting..." each 10 seconds.

Once connection is established will display some text like

Leaving...<br>com closed
*********************
pic path: ./RESOURCE/FINISH_S.bmp
***********************

The UI will show you in DETECTED INFO section the data about the chip.

32Mbit of RAM and 26 MHz cristall.

Step 3: Flash Ai-Thinker Firmware

You can find Ai-Thinker Firmware in this three places

Both zip files

AiThinker_1.5.4_AT_Firmware_DIO_8M_1MByte.zip and

At_firmware_bin1.54.zip are containing the same file that we need here.

Setup the flash-tool as folows:

  • flash AiThinker_ESP8266_DIO_32M_32M_20160615_V1.5.4.bin in position

    0x00000

  • keep CrystalFreq at 26M, SPI Speed at 40MHz
  • select SPI MODE: DIO
  • select Flash Size: 32Mbit

When are you ready press start.

As in previous step keep "Flash button" pressed and quiclky press and depresse "Reset" when Connecting is displayed.

Once connected the screen will pause for a while.

The flashing is showing the progress.

Once finished it will say "Leaving... comm closed" and it will display Finished green icon.

A little test:

run Arduino Serial Monitor at 115200 bauds.

Reset the ESP-12F.

AT+GMR

will show you the version of the firmware

AT+GMR
AT version:1.1.0.0(May 11 2016 18:09:56)
SDK version:1.5.4(baaeaebb)
Ai-Thinker Technology Co. Ltd.
Jun 13 2016 11:29:20
OK

Step 4: Flash Espressif AT-Firmware

For flashing the official Espressif Firmware you can follow the instructions section 1.2 of http://espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf. (The file is also attached here).

The firmware is part of the non-OS SDK.

There are several versions of the firmware:

In

ESP8266_NONOS_SDK_V1.5.2_16_01_29/bin/at/readme.txt and

esp8266_nonos_sdk_v2.0.0_16_08_10/bin/at/README.md there are the instructions for the memory mapping.

Step 5: Espressif AT From SDK 1.5.2 512+512 Memory Map

The readme sais for 32M and 512+512:

Flash size 32Mbit: 512KB+512KB
boot_v1.2+.bin          0x00000 
user1.1024.new.2.bin      0x01000
esp_init_data_default.bin    0x3fc000 (optional)
blank.bin               0x7e000 & 0x3fe000

So open the ESP flash tool and set the files and flashing positions accordly. (Picture 1)

Press flash, reset and click download, release reset (as in Ai-Thinker flashing).

The flashing should start writting to flash (Picture 2).

When finished you will get something like Picture 3.

Open Arduino IDE.

Open Serial Monitor.

Set 115200bauds, Both NL&CR (if not already done).

Reset ESP.

Then enter AT+GMR command.

Version should be:

AT version:0.60.0.0(Jan 29 2016 15:10:17)
SDK version:1.5.2(80914727) compile time:Jan 29 2016 19:07:08

If you do AT+RST you should get also something like

ets Jan  8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 816, room 16 tail 0 chksum 0x8d load 0x3ffe8000, len 788, room 8 tail 12 chksum 0xcf ho 0 tail 12 room 4 load 0x3ffe8314, len 288, room 12 tail 4 chksum 0xcf csum 0xcf 2nd boot version : 1.2 SPI Speed : 40MHz SPI Mode : DIO SPI Flash Size : 32Mbit jump to run user1 don't use rtc mem data

Step 6: Save Download Tools Settings

When you leave ESP Download Tool a file named tool_config.txt is created in the same directory as the exe.

This contains your last config.

For further reuse copy the tool_config.txt to anothe file (eg tool_config1.5.2.1024.txt).

You can reuse this file by overiting your saved file to tool_config.txt before restarting the download Tool.

Step 7: Espressif AT From SDK 2.0.0 1024+1024 Memory Map

The readme sais:

### Flash size 32Mbit-C1: 1024KB+1024KB
boot_v1.2+.bin 0x00000 user1.2048.new.5.bin 0x01000 esp_init_data_default.bin 0x3fc000 (optional) blank.bin 0xfe000 & 0x3fe000

Set the files as in the picture but keep memory type to 32Mbit.

Flash it.

Arduino Ide should say:

AT+GMR
AT version:1.3.0.0(Jul 14 2016 18:54:01) SDK version:2.0.0(656edbf) compile time:Jul 19 2016 18:44:22

Step 8: Espressif AT From SDK 1.5.2 1024+1024 Memory Map

The Readme says:

Flash size 32Mbit-C1: 1024KB+1024KB
boot_v1.2+.bin 0x00000 user1.2048.new.5.bin 0x01000 esp_init_data_default.bin 0x3fc000 (optional) blank.bin 0xfe000 & 0x3fe000

After flashing version is:

AT+GMR
AT version:0.60.0.0(Jan 29 2016 15:10:17)
SDK version:1.5.2(80914727)
compile time:Jan 29 2016 19:06:50
OK
AT+RST
OK
ets Jan  8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 816, room 16 
tail 0
chksum 0x8d
load 0x3ffe8000, len 788, room 8 
tail 12
chksum 0xcf
ho 0 tail 12 room 4
load 0x3ffe8314, len 288, room 12 
tail 4
chksum 0xcf
csum 0xcf
2nd boot version : 1.2
  SPI Speed      : 40MHz
  SPI Mode       : DIO
  SPI Flash Size : 32Mbit
jump to run user1
don't use rtc mem data

About This Instructable

1,065views

13favorites

License:

More by flav1972:ESP-12F: Flashing AT Firmware ESP-12F: ESP8266 Module - Minimal Breadboard for Flashing ESP-12F: ESP8266 module - connection test 
Add instructable to: