Problem flashing AT firmware on ESP-01

hobby_guy
Posts: 20
Joined: Sat Jan 29, 2022 3:29 pm

Problem flashing AT firmware on ESP-01

Postby hobby_guy » Sat Jan 29, 2022 3:49 pm

Hi all!

I've bought a bunch of ESP-01 (ESP8266) modules, which were all "preloaded" with some AT firmware from Ai-Thinker. On boot, I see this:
Ai-Thinker Technology Co. Ltd.
ready
I'm trying to learn how to flash NodeMCU on the ESP, so I can place my software directly on the ESP and not have to use a separate ATMEGA16 interfacing the Wifi through AT commands. For this, I'm using esptool.py. As far as I can tell, the flashing process is successful but I keep getting "csum err" after rebooting. I'm also getting problems if I try to revert back to the AT firmware (ESP8266-IDF-AT_V2.2.1.0). Is this the right firmware for AT on ESP8266...?

This is how the flashing of the IDF-AT binary looks, followed by what I see in the terminal on reboot (at 74480 baud). Btw, when flashing, I pull GPIO0 low, and after that I try to boot normally having GPIO0 not connected (floating).
$ py esptool.py -p COM7 erase_flash
esptool.py v3.3-dev
Serial port COM7
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting...
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC:
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 2.6s
$ py esptool.py --port COM7 --baud 115200 --after no_reset write_flash --flash_size detect --flash_mode dio 0x00000 esp-at.bin
esptool.py v3.3-dev
Serial port COM7
Connecting...
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting...
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC:
Stub is already running. No upload is necessary.
Configuring flash size...
Auto-detected Flash size: 1MB
Flash will be erased from 0x00000000 to 0x000cefff...
WARNING: Suspicious segment 0x40210010, length 711800
WARNING: Suspicious segment 0x402bdc88, length 107316
Flash params set to 0x022f
Compressed 844288 bytes to 529252...
Writing at 0x00000000... (3 %)
Writing at 0x00006746... (6 %)
Writing at 0x0000caf4... (9 %)
Writing at 0x00012fdb... (12 %)
Writing at 0x000191cb... (15 %)
Writing at 0x0001f2a7... (18 %)
Writing at 0x0002585d... (21 %)
Writing at 0x0002bc4d... (24 %)
Writing at 0x00031ca8... (27 %)
Writing at 0x00038099... (30 %)
Writing at 0x0003e62c... (33 %)
Writing at 0x00044571... (36 %)
Writing at 0x0004aa8f... (39 %)
Writing at 0x00050a3a... (42 %)
Writing at 0x00056984... (45 %)
Writing at 0x0005d8a4... (48 %)
Writing at 0x0006419e... (51 %)
Writing at 0x0006a3e9... (54 %)
Writing at 0x000717e5... (57 %)
Writing at 0x0007847f... (60 %)
Writing at 0x0007ea77... (63 %)
Writing at 0x0008410e... (66 %)
Writing at 0x000895a9... (69 %)
Writing at 0x0008ea03... (72 %)
Writing at 0x00093e40... (75 %)
Writing at 0x00099ea1... (78 %)
Writing at 0x000a041f... (81 %)
Writing at 0x000a6041... (84 %)
Writing at 0x000abb48... (87 %)
Writing at 0x000b39f5... (90 %)
Writing at 0x000bdd7c... (93 %)
Writing at 0x000c5798... (96 %)
Writing at 0x000cc812... (100 %)
Wrote 844288 bytes (529252 compressed) at 0x00000000 in 47.2 seconds (effective 143.1 kbit/s)...
Hash of data verified.

Leaving...
Staying in bootloader.
Power off, remove GPIO0->GND, and power on, gives me:
ets Jan 8 2013,rst cause:2, boot mode:(3,7)

load 0x40210010, len 711800, room 16
I notice there's some "suspicious segment" reported -- this didn't happen on my first attempts to flash. Just noticed this now.
Any help on getting past all this is greatly appreaciated! In summary:

1) How can I flash the ESP with the "original Ai-Thinker" AT firmware, so I have a way to revert to default if something fails?
2) Where do I find that firmware/binary? Is this even possible, or will ESP be shipped with some arbitrary firmware/version and there is really no way of telling what's there?
3) How can I run my own software directly "on" the ESP, without having to rely on a separate microcontroller (and AT commands)?

ESP_Sun
Posts: 326
Joined: Thu Dec 30, 2021 9:52 am

Re: Problem flashing AT firmware on ESP-01

Postby ESP_Sun » Mon Feb 07, 2022 2:29 am

1. Please refer to the AT firmware burning method: https://docs.espressif.com/projects/esp ... guide.html
2. You can get AT firmware from this link https://espressif-docs.readthedocs-host ... aries.html and you can query the device using AT+ GMR Built-in AT firmware version information.

Who is online

Users browsing this forum: No registered users and 8 guests