Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By rolcsar
#31952 I'm trying to use a Raspbrry Pi model B to program an esp8266 01, using Arduino IDE 1.6.5.
After succesfully installing the IDE an the esp8266 module, I didn't get the Blink example compiled. These were the errors:
Code: Select allArduino: 1.6.5 (Linux), Board: "Generic ESP8266 Module, Serial, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS)"

/home/pi/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -I/home/pi/.arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/tools/sdk//include -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -I/home/pi/.arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/cores/esp8266 -I/home/pi/.arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/variants/generic /tmp/build625978179943831622.tmp/sketch_oct21a.cpp -o /tmp/build625978179943831622.tmp/sketch_oct21a.cpp.o
/home/pi/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/bin/xtensa-lx106-elf-g++: 1: /home/pi/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/bin/xtensa-lx106-elf-g++: ELF¡Ÿ4lÊ: not found
/home/pi/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/bin/xtensa-lx106-elf-g++: 2: /home/pi/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/bin/xtensa-lx106-elf-g++: 4: not found
/home/pi/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/bin/xtensa-lx106-elf-g++: 1: /home/pi/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/bin/xtensa-lx106-elf-g++: Syntax error: word unexpected (expecting ")")
/home/pi/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/bin/xtensa-lx106-elf-g++ returned 2
Error compiling.

I don't know if this is really a bug or if I am missing something, but can't find nothing on the internet.

PS: before the first found word at the code above, there were some strange characters that could not be pasted.
PS 2: I am using debian Jessie
User avatar
By martinayotte
#32045 This is because all the toolschain/crosscompiler tools installed by the BoardManager in /home/pi/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/bin/ path are for Intel processors, not for an ARM processor such the one on RaspberryPi.
You will need to re-compile all the toolschain/crosscompiler tools by yourself, since I presume you are the first one to try such environment.

You can look at this site https://github.com/pfalcon/esp-open-sdk, but beware that you will probably face some other issues.
User avatar
By rolcsar
#32107 Thanks for the response. I am trying to build the toolchain, but my I'm running out of memory and disk space.
Besides, there are a few blobs provided by Espressif that may not work on an arm device.
If I get positive results, I'll post here.
User avatar
By rolcsar
#32412 I finally managed to install and run some examples. After 16 hours, the toolchain was built (I recommend an 8GB USB drive with ext4 filesystem), and copied not only the bin subfolder, but all subdirectories in the first xtensa-lx106-elf folder to 1.20.0-26-gb404fb9 dir.
I also have to build the esptool version 0.4.5 and copy the executable to packages/exp8266/tools/esptool/0.4.5.
The only problem is the heavy GUI of the IDE, got to use the Arduino command-line builder.