From ElectroDragon
Revision as of 17:04, 26 October 2015 by Chao (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Building the toolchain

As root

apt-get install git autoconf build-essential gperf bison flex texinfo libtool libncurses5-dev wget gawk
mkdir /opt/Espressif
chown $username /opt/Espressif (replace $username with the name of the local user)

as local user

git clone -b lx106 git:// 
cd crosstool-NG
./bootstrap && ./configure --prefix=`pwd` && make && make install
./ct-ng xtensa-lx106-elf
./ct-ng build

Setting up the SDK

wget -O /opt/Espressif/ESP8266_SDK/lib/libc.a
wget -O /opt/Espressif/ESP8266_SDK/lib/libhal.a
  • Add header/inlcude files:
wget -O /opt/Espressif/include.tgz
cd /opt/Espressif/
tar -xvzf include.tgz

Making the ESP tool

cd ~
tar -xvzf esptool_0.0.2.orig.tar.gz
sudo cp esptool/esptool /usr/bin

Make/compile the AT Example

comment the line #include user_config.h from /opt/Espressif/ESP8266_SDK/include/osapi.h

cd ~
mkdir esp_sources
cd esp_sources
  • copy the example at from SDK
cp -R /opt/Espressif/ESP8266_SDK/examples/at at
cd at 
  • get the make file
wget -O Makefile

will finallly get in seconds: (/home/xman/esp_sources/at/firmware)

FW firmware/0x00000.bin
FW firmware/0x40000.bin

Install python and relevant

  • Install python 2.7
apt-get install python
tar -xvzf pyserial-2.7.tar.gz
cd pyserial-2.7
python install


wget --port /dev/tty.usbmodem0E102EE1 write_flash 0x00000 0x00000.bin --port /dev/tty.usbmodem0E102EE1 write_flash 0x40000 0x40000.bin