[SOLVED] unable to flash AT firmware on ESP8266-01

Post #23 has my solution, once again huge thanks to Juraj

Hi,

As the title says, i have some trouble getting the AT firmware on my ESP8266 module.
This is the one i have.

For the programmer i use this little device

link if needed

I do have a switch installed so i can pull GPIO 0 to GND to get into flashing mode.

Now when i upload the ESP8266 CheckFlashConfig from the esp8266 examples the serial monitor will give me this:

Flash real id:   001420C2
Flash real size: 1048576 bytes

Flash ide  size: 524288 bytes
Flash ide speed: 40000000 Hz
Flash ide mode:  DOUT
Flash Chip configuration wrong!

Not sure what to make of that. Flash real size: 1048576 bytes = 8.3 megabits (Mbit)

When i use the flash_download_tools_v3.6.5 from the Espressif site it will show me some information about the ESP
This shows 8Mbit (picture below) so there i think we can confirm it's 8Mbit flash size?

Then we try to flash the standard AT firmware on there. This will not succeed.
I follow the offcicial guide from Espressif chapter: 1.2.4. 8 Mbit Flash

blank.bin - 0xFB000 
esp_init_data_default.bin - 0xFC000
blank.bin - 0x7E000 
blank.bin - 0xFE000 
boot.bin - 0x00000 In /bin/at
user1.1024.new.2.bin - 0x01000 In /bin/at/512+512

So here i found out i can not use the latest version of AT since that one only has bigger user1.2048.new.5.bin so i went and downloaded the version before that that has the right file.

I am not sure what to choose for the boot.bin file. There is
boot_v1.2.bin
boot_v1.6.bin
boot_v1.7.bin

I was assuming i needed boot_v1.6.bin since that is the AT firmware version i have, but i tried all three of them.
Also the esp_init_data_default.bin has
esp_init_data_default_v05.bin
esp_init_data_default_v08.bin
I can not find out witch one to choose.

The flashtool says finished after som seconds. The previous sketch is removed, if i open the serial monitor i will nog get any messages anymore.

However if i type the AT command in the serial monitor i get no response from the ESP.

Here a screenshot of the "download tools"

So anybody got any idea what is going on here? If i forgot to give some other information that is needed please let me know i tried to give everything i know :wink: :stuck_out_tongue:

do you have both line ends and 115200 baud set in Serial Monitor?
and io 0 is pulled-up?

I have Both NL & CR and in the lower corner baud is set to 115200 yes.

I do have a switch installed so i can pull GPIO 0 to GND to get into flashing mode too yes.

I can upload all sketches, just not able to get the AT on there.

Not sure if it does matter but the module is specifically that one showed with the "AI-Cloud inside" silkscreen.

I'm not a super fan of Espressif's tools, but I haven't taken much time to look at them and test them out. If you come across any good links for reference / documentation / tutorials for the flash_downloads_tools.exe in your search please post them in here. Especially something that really dumbs the chip down and shows the essentials.

Eventually I'm going to want to setup my own partition tables and I think I'll have to take a close look at the tool then.

I think I probably just need to get to know the chip and its specifications better to feel comfortable using the tools.

I wonder if Juraj has got a brain to UART bridge we can just hook up to? Sure would save a lot of time!

Bringamosa:
I am not sure what to choose for the boot.bin file. There is
boot_v1.2.bin
boot_v1.6.bin
boot_v1.7.bin

I was assuming i needed boot_v1.6.bin since that is the AT firmware version i have, but i tried all three of them.
Also the esp_init_data_default.bin has
esp_init_data_default_v05.bin
esp_init_data_default_v08.bin
I can not find out witch one to choose.

Same here. It's very annoying to me that the file names in the AT firmware supplied by Espressif don't match the file names in their documentation. I have always just picked the one with the highest number, but it's just stupid that their documentation is so ambiguous. The quality of the documentation from this huge company for a product sold by the millions is lower than what I would accept in a volunteer project I did on the weekend.

The last couple times I messed with the AT firmware, I found that the newest version (and maybe the one before that, I can't remember) didn't work. I had to go back a version or two and then it started working fine. Has anyone else experienced that?

the RF tab of the Flash Download Tool is editor for the esp_init_data_default.bin. you can load, edit and save it there.

if you don't check DoNotChngBib, the esp_init_data_default is overwritten be the FDT

there is a problem with the AT firmware bin files of AT firmware from august 2018. the files are for 2 MB or larger flash only. I could not flash it with esptool, but FDT changed the settings and the firmware works.
the instructions for flashing the AT firmware are in the AT commands reference doc

all esp8266 docs are here

pert:
I have always just picked the one with the highest number

The last couple times I messed with the AT firmware, I found that the newest version (and maybe the one before that, I can't remember) didn't work. I had to go back a version or two and then it started working fine. Has anyone else experienced that?

I have tried all the numbers, all different boot files and all diffrent init data deufault. Nothing.

I knew i had to go back a version since the last version was only for 2mb flash, wil try going back 2 versions.

Juraj:
the RF tab of the Flash Download Tool is editor for the esp_init_data_default.bin. you can load, edit and save it there.

there is a problem with the AT firmware bin files of AT firmware from august 2018. the files are for 2 MB or larger flash only. I could not flash it with esptool, but FDT changed the settings and the firmware works.

Wil have a look under the RF tab. Not sure if that will do anything for the AT firmware?

Esptool is a bit more confusing/ daunting with all its command line stuff but maybe I'll look at that too after going two versions AT firmware back.

Thank you for thinking along

Bringamosa:
I have tried all the numbers, all different boot files and all diffrent init data deufault. Nothing.

I knew i had to go back a version since the last version was only for 2mb flash, wil try going back 2 versions.

Wil have a look under the RF tab. Not sure if that will do anything for the AT firmware?

Esptool is a bit more confusing/ daunting with all its command line stuff but maybe I'll look at that too after going two versions AT firmware back.

Thank you for thinking along

I added the details for Per. you don't need to care about the RF tab and esp_init_data_default.bin if you use the FDT.

the FDT does a better job then esptool. but esptool doesn't need any more options. only the port the command write_flash and the right addresses and bin files

esptool.py -p COM-PORT write_flash 0x0 boot_v1.7.bin 0x01000 at/512+512/user1.1024.new.2.bin 0x3fc000 esp_init_data_default.bin 0xfe000 blank.bin 0x3fe000 blank.bin

Juraj:
there is a problem with the AT firmware bin files of AT firmware from august 2018. the files are for 2 MB or larger flash only.

I was trying to use them exclusively on ESP8266 modules with 4 MB of flash.

Juraj:
I could not flash it with esptool, but FDT changed the settings and the firmware works.

I was using FDT.

Juraj:
the instructions for flashing the AT firmware are in the AT commands reference doc

https://www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf

I know it well. That is the documentation I was complaining about.

pert:
I was trying to use them exclusively on ESP8266 modules with 4 MB of flash.
I was using FDT.

I flashed this large AT firmware to esp8266 on Uno WiFi Dev Ed and to an esp-12F successful. I even flashed it to a module with 1MB flash and it reacts to AT commands, but has wrong RF settings (the bin file overlaps the RF settings region).

I plan to to install the toolchain to be able to compile the AT firmware without "smartsetup" feature. Then it will fit into 1 MB flash. I write a new WiFiEsp library which will use the new "passive mode" of the AT firmware so I am interested in smooth flashing of this version.

Juraj:
but has wrong RF settings (the bin file overlaps the RF settings region).

If I remember correctly, the problem I was having with the new firmware was that it would go into an endless reboot loop. Did you have the same problem?

Juraj:
I plan to to install the toolchain to be able to compile the AT firmware without "smartsetup" feature. Then it will fit into 1 MB flash. I write a new WiFiEsp library which will use the new "passive mode" of the AT firmware so I am interested in smooth flashing of this version.

It sounds like a great project!

pert:
If I remember correctly, the problem I was having with the new firmware was that it would go into an endless reboot loop. Did you have the same problem?

if flashed with esptool it was silent.
in FDT did you use the 16 Mbit flash setting?
did you enable bin changing in FDT?

Juraj:
if flashed with esptool it was silent.

I meant that the flashing was successful, but then as soon as I reset the ESP8266 or power cycled it, the ESP8266 went into an endless reboot loop.

Juraj:
in FDT did you use the 16 Mbit flash setting?
did you enable bin changing in FDT?

I checked "SpiAutoSet" and then used all the default settings that it detected from my ESP8266. I'm sure it used the 32 Mbit flash setting. I don't know about the DoNotChgBin setting. It would have been set to whatever the FDT default setting was.

pert:
I checked "SpiAutoSet" and then used all the default settings that it detected from my ESP8266. I'm sure it used the 32 Mbit flash setting. I don't know about the DoNotChgBin setting. It would have been set to whatever the FDT default setting was.

I used flash addresses for 16 Mbit module with august 2018 version of AT firmware bins

Well i have for another wall....

Somehow i got something flashed on there. Dont ask me what all i know is the asress was 0x00000 where boot bin must go I suppose? It was v.0.9.5.2 AT firmware.bin file flashed with esp8366 flasher

Might have bricked the thing?

Anyways whenever i open FDT the thing hops on the 460800 baud. Any serial terminal i can use that baud on? Termite and arduino serial monitor both don't have that option.

Almost at a point to throw his thing in the trash but hey, i can't just throw stuff away that MAY work someday

Bringamosa:
Anyways whenever i open FDT the thing hops on the 460800 baud. Any serial terminal i can use that baud on? Termite and arduino serial monitor both don't have that option.

you can select the speed. I flash at 921600 baud.
the flashing speed has nothing to do with the default communication speed of the flashed AT firmware. default speed is of AT firmware is 115200 baud

Allright. Well i can upload whatever sketch i want and it will work but getting AT firmware on there is ano go.

You said only the first two are needed, blank.bin and esp_init_data_default_v05.bin right?

Then i am stuck and guess ill have to five up.

Tried te files from v1.6 v1.6.2 and v1.7

Bringamosa:
Allright. Well i can upload whatever sketch i want and it will work but getting AT firmware on there is ano go.

You said only the first two are needed, blank.bin and esp_init_data_default_v05.bin right?

Then i am stuck and guess ill have to five up.

Tried te files from v1.6 v1.6.2 and v1.7

No. Only the first two are needed if you want to initialize the RF settings for the Arduino sketches after erasing the flash or overwriting RF settings because of wrong flash size set and similar troubles

Allright, well i followed the documents for the 8Mbit AT firmware installation too, trying to flash all .bin files no succes.

Wanted to measure voltage and update that on iot dashboard. Since the esp8266-01 doesn't have the adc ecposed/available i wanted to put this thing on my arduino nano.

It looked so simple, but for me it's a mystery why this is not working.