I can communicate with the ESP8266 via AT commands with no problem, but I cannot flash any code onto it. I have tried two different ESP8266 devices with the same result. One of them is a ESP8266-01 and the other a ESP8266-07. I believe I am following the correct procedure in placing the device into bootloader mode; connect GPIO0 to ground and then reset it by temporarily connecting RST to ground.
When I try to flash my LED blink code, I get these messages from Arduino IDE:
Warning: platform.txt from core 'ESP8266 Modules' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
Sketch uses 198,840 bytes (45%) of program storage space. Maximum is 434,160 bytes.
Global variables use 33,034 bytes (40%) of dynamic memory, leaving 48,886 bytes for local variables. Maximum is 81,920 bytes.
warning: espcomm_sync failed
error: espcomm_open failed
The settings that I am using within the Arduino IDE are the default ones for ESP8266:
Board: Generic ESP8266 Module
Flash Mode: DIO
Flash frequency: 40MHz
Upload using: Serial
CPU Frequency: 80MHz
Flash size: 512K (64 SPIFFS)
Reset Method: ck
Upload speed: 115,200
Port: COM2
Programmer: AVRISP mkII
I am using an Arduino Mega2560 as the USB-to-serial converter. I have verified that USB-to-serial converter works because I am able to successfully communicate with the ESP2866 with AT commands and even connect to my wifi network with no issues.
My hardware connections are:
Arduino Mega 2560 to ESP8266 ESP-01:
—————————
GND — GND
TX — RX via a voltage divider that steps own 5V to 3.3V
RX — TX
ESP8266 connections:
———————–
VCC - +3.3V
GND - GND
CH_PD - +3.3V via a 10kOhm resistor
GPI0 - GND
RST - GND
Somebody mentioned trying to connect TX to TX and RX to RX which I have tried. The warnings at the start of the code compilation worry me a bit. Perhaps there is some software problem with the Ardino IDE? Within the ‘Boards manager’ I have installed ‘esp8266 by ESP8266 community version 2.0.0’.
If anybody could provide any assistance I would be very grateful. I’ve spent about four days trying to get these chips to work with quite a bit of frustration. Thanks in advance.