Skip to content

Toolchain

zarya edited this page Oct 12, 2014 · 35 revisions

#Building the toolchain

##as root:

32-Bit systems

apt-get install git autoconf build-essential gperf bison flex texinfo libtool libncurses5-dev wget gawk libc6-dev-amd64
mkdir /opt/Espressif
chown $username /opt/Espressif 

64-bit systems

apt-get install git autoconf build-essential gperf bison flex texinfo libtool libncurses5-dev wget gawk libc6-dev-i386
mkdir /opt/Espressif
chown $username /opt/Espressif 

(replace $username with the name of the local user)

##as local user:

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

#Setting up the SDK download esp8266_sdk_v0.9.1.zip: http://rghost.net/download/58019758/eff3feb46a2047a0de0d56479d21fab434429fea/esp8266_sdk_v0.9.1.zip

extract esp8266_sdk_v0.9.1.zip to /opt/Espressif/ESP8266_SDK

#Adding libs to the SDK

wget -O /opt/Espressif/ESP8266_SDK/lib/libc.a https://github.com/esp8266/esp8266-wiki/raw/master/libs/libc.a
wget -O /opt/Espressif/ESP8266_SDK/lib/libhal.a https://github.com/esp8266/esp8266-wiki/raw/master/libs/libhal.a

Added header files

find ESP-IOT-SDK-NOVM.rar

Extract the contends of the rar file, after that extract the contends of the .exe file.

This will give you a directory usr Copy over the libs

cp -R usr/xtensa/XtDevTools/install/builds/RC-2010.1-win32/lx106/xtensa-elf/include /opt/Espressif/ESP8266_SDK/

#Installing ESP tool Download the deb for esptool from the git repo or download the source and build yourself.

dpkg -i esptool_0.0.2-1_i386.deb

Next step: Building