Downloading and installing the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By phrend
#35163 After fiddling around for a couple evenings, I finally was able to program my ESP-12 with a simple blink sketch - I was so excited, cause I finally did it! Well - my excitement was very short lived, as I can't write new code to it again... :(

My ESP is this "dev board": http://www.ebay.com/itm/201345364308
My USB to Serial-TTL is: http://www.ebay.com/itm/331529699010 (Pl2303HX based)
My OS is OS X 10.11
Arduino IDE: 1.6.5 (1.6.6 was throwing errors, and I found a post saying that 1.6.5 worked, so I downgraded, and 1.6.5 worked, the one and only time that I was successfully programmed my ESP)

My wiring of the dev board is:
VCC: +3.3VDC
GND: GND from my power supply and GND on the Pl2303HX
TXD: TXD on the Pl2303HX
RXD: RXD on the Pl2303HX

I originally had TXD to RXD, but that wasn't working, so this wiring is what worked for me - once.

I found someone that mapped out this dev board here: http://blog.squix.ch/2015/01/esp8266-te ... eview.html

Basically, I just took the standard blink sketch, updated it so that it would blink pin0 rather than pin13, put the programming jumper in place, powered up the board, and programmed it. It seemed to work, so I removed the programming jumper, and power-cycled it, and it worked! I got excited!

Next, I attempted to update the blink sketch so it would blink faster... I removed power from the dev board, put the programming jumper back in place, powered it up, and tried to program it with the new code... but the Arduino IDE is giving me:

Code: Select allSketch uses 201,090 bytes (46%) of program storage space. Maximum is 434,160 bytes.
Global variables use 44,608 bytes (54%) of dynamic memory, leaving 37,312 bytes for local variables. Maximum is 81,920 bytes.
Uploading 205232 bytes from /var/folders/1j/02cnzrls7jn85d75wx7vsb6c0000gn/T/build4626231541189908258.tmp/Blink.cpp.bin to flash at 0x00000000
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed


Any ideas what's changed? I do see the blue LED on the ESP itself blink once when I try to program it, so something is happening...

Thanks in advance!
User avatar
By phrend
#35176 (I didn't mean to post this in the Downloading and installing section - it probably belongs in the General section, but I can't move it.)

I put my computer to sleep, and disconnected the Pl2303HX and powered down the ESP-12 and went out to dinner.

When I got home, I noticed that viewtopic.php?f=32&t=6746#p34767 says that GPIO15 should be connected to GND, and noticed that it isn't on my dev board, so I did that, then tried to write a sketch to it... and it worked! So, I thought that might have been my problem, but then I tried to write another sketch and it's failing again, so I guess not.

I have an FTDI usb adapter, so I guess I'll give it a shot and see if it makes any difference...
User avatar
By phrend
#35499 Well, I can't speak to why it ever worked at all (though only about 1% of the time), but I found this:
http://hpclab.blogspot.com/2015/06/esp8 ... -os-x.html

and ended up installing esptool.py and pyserial, then modifying my platform.txt file to have:

Code: Select alltools.esptool.upload.pattern="/path/to/esptool.py" --port "{serial.port}" write_flash 0x00000 "{build.path}/{build.project_name}.bin"


and it works!
User avatar
By phrend
#49522 I just upgraded my Arduino IDE to v1.6.9 and the latest version of https://github.com/themadinventor/esptool and had to add the baud to the command, like:

Code: Select alltools.esptool.upload.pattern="/Users/phrend/git/esptool/esptool.py" --port "{serial.port}" --baud 115200 write_flash 0x00000 "{build.path}/{build.project_name}.bin"