ESP8266 chipset is widely used in IoT, also in my projects. There are multiple ways to flash chipset, you may use https://platformio.org/, Arduino IDE, or simply flasher esptool available here: https://github.com/espressif/esptool
Hardware
Writing ESP8266 there are multiple versions of boards (eg. ESP-12, ESP-12E and ESP-12F, ESP-01, ESP32 ) that may differ in Flash size. It is worth to check first if there is enough available memory to flash an image.
For flashing we require FDTDI USB/UART adapter and correct connections like this:
![](https://i0.wp.com/iot.formatx.net/wp-content/uploads/2019/09/image-6.jpeg?resize=663%2C370)
The most important is connect GPIO0 with GND for the time of flashing. Later you remove this connection.
Very convenient is using dedicated adapter 2in1: Geekcreit® USB To ESP8266 Serial Adapter Wireless WIFI Develoment Board Transfer Module It has already UART chip on board.
![](https://i1.wp.com/iot.formatx.net/wp-content/uploads/2019/09/image-4.png?fit=1024%2C751)
It might be used later to power up your esp board and what is important you do not have to solder CH-PD with VCC to start microprocessor.
You may also use similar to these, they allows to program also different devices that have RX/TX communication. Also you may select between 5V and 3V3:
![](https://i0.wp.com/imgaz.staticbg.com/images/oaupload/banggood/images/4A/1F/72fb76d9-d3ad-45a4-9323-e9924a3d7805.jpg?w=700&ssl=1)
![](https://i0.wp.com/imgaz.staticbg.com/images/oaupload/banggood/images/16/1D/6616724e-f7b7-47ea-a7a2-e47cc0ec21ea.jpg?w=700&ssl=1)
How to flash
To flash I short GPIO0 and GND like below, before puting ESP8266 to the board.
![](https://i1.wp.com/iot.formatx.net/wp-content/uploads/2019/09/image-8.jpeg?fit=768%2C1024)
![](https://i2.wp.com/iot.formatx.net/wp-content/uploads/2019/09/image-7.jpeg?fit=768%2C1024)
Assuming that we have already image. you run the following command
1 |
esptool.py --port /dev/ttyUSB0 write_flash -fs 1MB -fm dout 0x0 sonoff.bin |
Another interesting adapter however it does not have USB/UART interface but have stabilized VCC and you may use 5V input voltage.
![](https://i0.wp.com/iot.formatx.net/wp-content/uploads/2019/09/image-5.png?resize=700%2C494)