This document will allow you to develop native 'C' firmware applications for the ESP8266 using Windows. You can setup your development environment using Microsoft DevStudio IDE. Using the accompanying serial terminal and flash writer application, you will be able to edit compile, link, flash and run without ever needing to leave the IDE.
The ESP8266 runs on 3.3V and is NOT 5V TOLERANT, so you cannot just connect it to an Arduino. As the chip can draw up to 300mA when transmitting, you will need a good power supply. If in doubt, use a large capacitor (>100uf) to regulate the supply, near the chip. Failure to do so will result in instability.
Since the firmware is uploaded through the serial interface, you will typically use a USB to serial adapter. Here is the one I use:
Make sure you get one that works at 3V or with a 3V/5V switch, like this one.
ESP-01 Hardware connections
To get the chip into firmware update mode, the chip needs to be reset while GPIO0 is held low and GPIO2 is held high. The above circuit uses the USB-serial adapter's DTR line to pull GPIO0 low and reset the chip via a small capacitor. GPIO0 needs to be held down for about 15ms after reset for the chip to go into firmware update mode. After that, GPIO0 needs to be released, as the bootloader then reconfigures GPIO0 as an output. All of this is handled automatically by the flash tool.
The following lists all the software components I have gathered in order to create and upload firmware for the ESP8266. Most of these components have been supplied by other hobbyists and are subject to change or move. Even the official SDKs supplied by Espressif seem to evolve rather quickly.
This particular version of the toolset is designed to work under Windows 7 or 8, 32 or 64bit.
Here is a step by step guide:
%comspec% /k E:\ESP8266\VARS.cmd
. When I click this I get a command prompt with the proper path already set.
* For the same reason, I also created a batch file that sets up the path before calling make:malloc()
for many larger structures that would be otherwise declared on the stack in other environments.
By default, all code goes into iram, which is only 32k, so it is easy to overflow that segment by linking in a bunch of stuff from the libraries or from your own code.
Use ICACHEFLASHATTR on your functions to make sure they go into irom instead. Irom resides off-chip on a 4M flash ROM, thus leaving about 240-440kB for applications. Although the final compiled program appears huge (about 180k in irom, and 28k in iram), most of this is library code that runs the Wifi and IP stacks. The actual user application is something like 8k.
The hardware design shown above also assumes that the switch will remain open at bootup, as GPIO2 needs to be high for the chip to boot normally.
===== Eclipse IDE =====
Looks like this is the best lead for that at this moment:
Eclipse IDE for ESP8266
======Arduino IDE =====
Go to Arduino site and download the IDE
Unzip it wherever
Go to the ESP8266 libraries and follow the easy install
Lots of programms for you to try
http://www.arduino.cc/en/Main/Software
https://github.com/esp8266/Arduino