Flashing problem - ESP is blinking, no REPL

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
michalt
Posts: 3
Joined: Thu Aug 08, 2019 6:04 pm

Flashing problem - ESP is blinking, no REPL

Post by michalt » Thu Aug 08, 2019 6:13 pm

Hi,

I am running into following issue with my ESP8266 during MicroPython launch.

I have following steps done:
- pyton, pip and things installed,
- `esptool.py erase_flash` works
- `esptool.py --port /dev/cu.SLAB_USBtoUART --baud 115200 write_flash --flash_size=detect 0 esp8266-20190529-v1.11.bin` works but..

After successful flashing (the process is completed without errors on terminal) ESP is "blinking like crazy" - https://monosnap.com/file/oFSsUK8AwEhle ... SN5h3aYoNY

and connecting to REPL is returning never ending mess - https://monosnap.com/file/Xc3Lgaef76Pza ... EvoWzluljZ

What do I do wrong? Any hint?

User avatar
Roberthh
Posts: 1569
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Flashing problem - ESP is blinking, no REPL

Post by Roberthh » Thu Aug 08, 2019 6:29 pm

What type of ESP8266 module do you have?
Which messages do you get during flashing. Does the reported flash size meet the real one?
The blinking us most likely caused by the message stream, which is either at 115200 baud or 74880 baud.

michalt
Posts: 3
Joined: Thu Aug 08, 2019 6:04 pm

Re: Flashing problem - ESP is blinking, no REPL

Post by michalt » Thu Aug 08, 2019 7:57 pm

Erase logs: https://monosnap.com/file/64lu9V0UW7ZdT ... P19xD0pfbj
Flashing logs: https://monosnap.com/file/eKLI9hpJZ1CIm ... zw52zpAfq1
Device details: https://monosnap.com/file/lENP0Od2fpw3C ... otlCDOAgBA

EDIT

I have another ESP8266: https://monosnap.com/file/w1JcRgYfRlYPP ... y3q4WeY91G
This one already works... the other one doesn't.

I will use the working one then. ;)

User avatar
Roberthh
Posts: 1569
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Flashing problem - ESP is blinking, no REPL

Post by Roberthh » Thu Aug 08, 2019 8:17 pm

The 16 MB flash is what's causing the trouble. The standard firmware is made for devices with up to 4 MB flash. YOu have two option:
a) use 4 MB flash only. You other ESP8266 has only 4 MB flash
For that, flash the firmware by telling, that the flash size is 4 MB:
esptool.py --port /dev/cu.SLAB_USBtoUART --baud 460800 write_flash --flash_size=4MB 0 esp8266-20190529-v1.11.bin

b) Flash for 16 MB. That requires one more step, according to https://github.com/micropython/micropython/issues/2335
b.1 Download esp_init_data_default.bin from https://github.com/espressif/esp8266_at/tree/master/bin
b.2. Flash both files to the esp8266 with:
esptool.py --port /dev/cu.SLAB_USBtoUART write_flash -fm dio 0xffc000 esp_init_data_default.bin
# do not autodetect, force 16MB flash
esptool.py --port /dev/cu.SLAB_USBtoUART --baud 460800 write_flash -fm dio -fs 16MB 0 esp8266-20190529-v1.11.bin

michalt
Posts: 3
Joined: Thu Aug 08, 2019 6:04 pm

Re: Flashing problem - ESP is blinking, no REPL

Post by michalt » Thu Aug 08, 2019 9:48 pm

Thanks!

I used the option where I manually set `4MB` and it works fine to me.

Post Reply