See here http://www.esp8266.com/wiki/doku.php?id=toolchain&#this_section_covers_using_the_arduino_ide