Moderator: igrr
This might help others too
Step 1 : Installing Arduino IDE on RPi2, we'll use precompiled IDE for RPi from NicoHood Git repo.
git clone https://github.com/NicoHood/Arduino-IDE-for-Raspberry.git
cd Arduino-IDE-for-Raspberry-master
tar xvf arduino-1.6.8-rc1-arm.tar.xz
cd arduino-1.6.8
sh install.sh
At this time we have Arduino 1.6.8 installed.
Step 2 : Installing ESP8266 board package.
In the preferences window of Arduino IDE put the URL below in the field "URL additionnal board manager"
http://arduino.esp8266.com/stable/package_esp8266com_index.json
In Arduino IDE, open board manager in tool menu, select and install esp8266 package.
Now, we have Arduino IDE with ESP8266 support, BUT the package is for linux x86. So we'll have to replace the toolchain with an ARM one.
Step 3 : Building ESP8266 toolchain, we'll use esp-open-sdk from pfalcon git repo.
Go to 'https://github.com/pfalcon/esp-open-sdk' and install dependencies for Debian/Ubuntu except 'unrar' package (apparently not available for raspbian).
Get the sources and build toolchain :
git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
make STANDALONE=y
Build take pretty long time, so it's time to take a big cup of tea and smoke a good pipe. If your hurried, here is a wetransfer URL where I've post the useful precompiled part of the toolchain : http://we.tl/hoF4Xt3BRh
Step 4 : Replacing x86 toolchain with ARM one.
Delete all file and folder in ./arduino15/packages/tools/xtensa-lx106-elf-gcc/1.20.0-gb404fb9-2/xtensa-lx106-elf/
Under the 'esp-open-sdk' directory, there's a 'xtensa-lx106-elf' subdirectory. Copy all the content of this subdirectory in ./arduino15/packages/tools/xtensa-lx106-elf-gcc/1.20.0-gb404fb9-2/xtensa-lx106-elf/
At this time, we have Arduino IDE configured with ESP8266 package with ARM toolchain.
Step 5 : Replacing x86 esptool by ARM one
We have to get esptool-ck source package :
git clone https://github.com/igrr/esptool-ck.git
cd esptool-ck
make
We have to replace current x86 esptool by our fresh built one in ./arduino15/packages/esp8266/tools/esptools/
That's all folks ...