Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By fluppie007
#12443 I created two new clean Ubuntu 14.04.2 LTS virtual machines using vmware workstation 11. One is a 32-bit and the other one is a 64-bit. Both have 2GB RAM and 2 cores assigned.
They both succeed to build the esp-open-sdk chain. I followed these instructions: http://www.penninkhof.com/2015/03/esp8266-open-sdk/
Did nothing else except apt-get update/upgrade before building the toolchain.

However when building the Blinky sample I get:

philippe@ubuntu:/opt/esp-open-sdk/source-code-examples/blinky$ make clean
philippe@ubuntu:/opt/esp-open-sdk/source-code-examples/blinky$ make
CC user/user_main.c
AR build/app_app.a
LD build/app.out
FW firmware/0x00000.bin
make: /usr/bin/esptool: Command not found
make: *** [firmware/0x00000.bin] Error 127

philippe@ubuntu:/opt/esp-open-sdk/source-code-examples/blinky$ make
FW firmware/0x00000.bin
make: /usr/bin/esptool: Command not found
make: *** [firmware/0x00000.bin] Error 127


philippe@ubuntu:/opt/esp-open-sdk/ESP8266_Relay_Board/firmware$ make
CC driver/i2c.c
make: /opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc: Command not found
make: *** [build/driver/i2c.o] Error 127

Any idea where this is coming from? Both the 32-bit as the 64-bit VM fail to build the Blinky Sample and the Harizanov's (https://github.com/mharizanov/ESP8266_Relay_Board) code...
I'm clueless!
User avatar
By sej7278
#12445 either the makefile you're using has hardcoded paths or you've got some remnants of an old toolchain lying around, as gcc should be in /opt/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc not /opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc

hmm, looking at the tutorial you're linking to, you haven't followed it - specifically the sed bits.

esp-open-sdk compiles nodemcu without problem now
User avatar
By fluppie007
#12465 I found that the makefile (https://github.com/esp8266/source-code- ... y/Makefile) references to /usr/bin for the esptool (@line 65). Changed that to /opt/esp-open-sdk/esptool but now I get a permission denied error

philippe@ubuntu:/opt/esp-open-sdk/source-code-examples/blinky$ make clean
philippe@ubuntu:/opt/esp-open-sdk/source-code-examples/blinky$ make
CC user/user_main.c
AR build/app_app.a
LD build/app.out
FW firmware/0x00000.bin
make: execvp: /opt/esp-open-sdk/esptool: Permission denied
make: *** [firmware/0x00000.bin] Error 127
User avatar
By fluppie007
#12571 source: http://www.penninkhof.com/2015/03/esp8266-open-sdk/
I commented to the writer of the instructions and he added the following lines:

# Installing the ESP image tool
cd /opt/esp-open-sdk
wget -O esptool_0.0.2-1_i386.deb https://github.com/esp8266/esp8266-wiki ... 1_i386.deb
sudo dpkg -i esptool_0.0.2-1_i386.deb
rm esptool_0.0.2-1_i386.deb

blinky and basic_example are now compiling just fine :)