Making your own environment for ESP8266.

If you don't want to use my setup described here, you can make your own setup using your own distribution.

You can make your own environment for compiling your code or the demo code for the ESP8266.

Step 1.

Download ova image  ( lunbuntu 14.04) for VirtualBox or install your preferred Linux distribution.

User is esp8266 and password is  espressif

sudo apt-get install git autoconf build-essential gperf bison flex texinfo libtool libncurses5-dev 

wget gawk libc6-dev python-serial libexpat1-dev

Step 2.

sudo mkdir /opt/Espressif

Step 3.

sudo chown esp8266 /opt/Espressif/

Step 4.

cd /opt/Espressif

Step 5.

git clone -b lx106 git://

Step 6.

cd crosstool-NG/

./bootstrap && ./configure --prefix=`pwd` && make && make install

Step 7.

./ct-ng xtensa-lx106-elf

Step 8.

./ct-ng build

Note: It takes about 25 minutes !!!!!!!

Step 9.

Edit the .profile file from /home/esp8266 and add the line


Step 10.

cd /opt/Espressif

wget -O


Note: is the SDK from 23 Jan 2015. Verify if there is a new one.

Step 11.


mv esp_iot_sdk_v0.9.5 ESP8266_SDK/

Step 12.

cd /opt/Espressif/ESP8266_SDK

wget -O lib/libc.a

wget -O lib/libhal.a

wget -O include.tgz

tar -xvzf include.tgz

rm include.tgz

Step 13.

cd /opt/Espressif

git clone esptool-py

chown -R esp8266 crosstool-NG/

sudo ln -s $PWD/esptool-py/ crosstool-NG/builds/xtensa-lx106-elf/bin/

Step 14.

The SDK has a directory named Document with some pdf files about API, AT commands and release notes.

Step 15. 

Copy the "at" directory from /opt/Espressif/ESP8266_SDK/examples and compile it

cp -R /opt/Espressif/ESP8266_SDK/examples/at /opt/Espressif/ESP8266_SDK/

cd /opt/Espressif/ESP8266_SDK/at

make clean


The result resides in the /opt/Espressif/ESP8266_SDK/bin directory

Flashing the code. Note that the above command is on long line. You can put the command into a file flashEsp, give that file executable rights and use it with ./flashEsp

sudo /opt/Espressif/esptool-py/ --port /dev/ttyUSB0 write_flash 0x3C000 /opt/Espressif/ESP8266_SDK/bin/blank.bin 0x00000 /opt/Espressif/ESP8266_SDK/bin/eagle.flash.bin 0x40000 /opt/Espressif/ESP8266_SDK/bin/eagle.irom0text.bin OR /opt/Espressif/esptool-py/ -p /dev/ttyUSB0 write_flash 0x40000 ../bin/eagle.irom0text.bin write_flash 0x00000 ../bin/eagle.flash.bin

I hope I didn't missed any step.

0 Response to "Making your own environment for ESP8266."

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel