How to flash ESP-01 (this is NOT a programmer board!)

How to flash ESP-01 (this is NOT a programmer board!)

I had a hard time flashing the basic Blink program to the ESP-01 due to a misleadingly described programmer board I had purchased online.

Both Arduino IDE and PlatformIO gave me the error below, which is no surprise because the board does not put the ESP-01 into flash mode.

Sketch uses 247944 bytes (49%) of program storage space. Maximum is 499696 bytes.
Global variables use 28032 bytes (34%) of dynamic memory, leaving 53888 bytes for local variables. Maximum is 81920 bytes.
error: failed reading byte
warning: espcomm_send_command: can't receive slip payload data
error: failed reading byte
warning: espcomm_send_command: can't receive slip payload data
error: failed reading byte
warning: espcomm_send_command: can't receive slip payload data
error: failed reading byte
warning: espcomm_send_command: can't receive slip payload data
error: failed reading byte
warning: espcomm_send_command: can't receive slip payload data
error: failed reading byte
warning: espcomm_send_command: can't receive slip payload data
error: failed reading byte
warning: espcomm_send_command: can't receive slip payload data
error: failed reading byte
warning: espcomm_send_command: can't receive slip payload data
error: failed reading byte
warning: espcomm_send_command: can't receive slip payload data
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

This thread on the Arduino forums says to pull down GPIO0 to ground to put the module into flash mode. I figured the USB programmer module would do that automatically. It turns out the programmer module I bought is not a programmer. It’s a Serial to USB interface (shown below) which was misleadingly described on AliExpress/Ebay as “ESP01 Programmer Adapter UART GPIO0 ESP-01 Adapter ESP8266 USB to ESP8266 Serial Wireless Wifi Development Board Module”.

ESP01 Programmer Adapter UART GPIO0 ESP-01 Adapter ESP8266 USB to ESP8266 Serial Wireless Wifi Development Board Module

This video shed some light on the issue and explains how to convert this module to a programmer:

As soon as I had done that, PlatformIO flashed the Blink program without a problem. Here is the Platformio.ini file content:

[platformio]
env_default = esp01

[env:esp01]
platform = espressif8266
framework = arduino
board = esp01