Flashing Micropython on ESP8266 With Arduino

Note that this procedure should be similar for firmwares other than Micropython as well.

Wiring with Arduino UNO

UNO — ESP8266
RX — RX 
TX — TX 
GND — GND 
GND — GPIO 0 
3.3V — VCC 
3.3V — CH_PD

Flashing Micropython firmware

  • Determine esp8266 type
    esptool.py --port /dev/ttyUSB0 flash_id
  • Download firmware as per the flash size reported. I’m using esp8266-1m-20210202-v1.14.bin since my chip has 1MB flash.
  • Erase existing firmware
    esptool.py --port /dev/ttyACM0 erase_flash
  • Flash and verify
    esptool.py --port /dev/ttyACM0 --baud 115200 write_flash --flash_size=detect 0 esp8266-1m-20210202-v1.14.bin --verify

Loading programs

In order to access Micropython REPL or load programs you will have to disconnect GPIO0 from ground. It is grounded only when you are flashing the chip.

You can load programs or access Micropython REPL using PyCharm with this plugin

References: