ESP8266/First setup

From NURDspace
Revision as of 23:11, 2 October 2014 by Zarya (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

/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

Making the ESP tool

cd esptool

change the line TARGET_ARCH to LINUX

make

Prepping 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
cp -R /opt/Espressif/ESP8266_SDK/examples/at at
cd at 
wget -O Makefile https://gist.githubusercontent.com/zarya/7e1a08160bf3b7ac220f/raw/a58ed9a1243dece92b671062bb16555844b326ab/gistfile1.mak
make

now upload the files in firmware directory to the module with esptool.py ( https://github.com/themadinventor/esptool/ )

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