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

User avatar
By Wizzard
#2793 Hi,
I'm trying to setup a complete IDE for esp8266 using Ubuntu VirtualBox, official esp gcc and eclipse.

1. I've downloaded official GCC, followed the instructions and successfouly compliled IOT_Demo from command line.

2. I've downloaded Eclipse and installed it ( together with JRE ) onto my Ubuntu VirtualBox

3. I launched Eclipse, and created the project like File->New->Project->makefile Project with existing code pointing the project source onto /app directory

4. After the projec got created I edited Project->Properties->Builders and added new builder configuration setting:
Location: /home/esp8266/Share/esp_iot_sdk_v0.9.2/app/gen_misc.sh
Working Direstory: /home/esp8266/Share/esp_iot_sdk_v0.9.2/app/


5. I tried to build with Project->Build All and received the following output in console:

+ make
make[1]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/user'
make[1]: Leaving directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/user'
make[1]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/driver'
make[1]: Leaving directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/driver'
make[1]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/lwip'
make[2]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/lwip/api'
make[2]: Leaving directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/lwip/api'
make[2]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/lwip/app'
make[2]: Leaving directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/lwip/app'
make[2]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/lwip/core'
make[3]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/lwip/core/ipv4'
make[3]: Leaving directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/lwip/core/ipv4'
make[2]: Leaving directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/lwip/core'
make[2]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/lwip/netif'
make[2]: Leaving directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/lwip/netif'
make[1]: Leaving directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/lwip'
make[1]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/json'
make[1]: Leaving directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/json'
make[1]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/ssl'
make[2]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/ssl/app'
make[2]: Leaving directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/ssl/app'
make[2]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/ssl/crypto'
make[2]: Leaving directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/ssl/crypto'
make[2]: Entering directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/ssl/ssl'
make[2]: Leaving directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/ssl/ssl'
make[1]: Leaving directory `/mnt/Share/esp_iot_sdk_v0.9.2/app/ssl'
+ '[' 0 == 0 ']'
+ rm ../bin/eagle.app.v6.flash.bin ../bin/eagle.app.v6.irom0text.bin ../bin/eagle.app.v6.dump ../bin/eagle.app.v6.S
+ cd .output/eagle/debug/image
+ xt-objdump -x -s eagle.app.v6.out
/home/esp8266/Share/esp_iot_sdk_v0.9.2/app/gen_misc.sh: line 8: xt-objdump: command not found
+ xt-objdump -S eagle.app.v6.out
/home/esp8266/Share/esp_iot_sdk_v0.9.2/app/gen_misc.sh: line 9: xt-objdump: command not found
+ xt-objcopy --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin
/home/esp8266/Share/esp_iot_sdk_v0.9.2/app/gen_misc.sh: line 11: xt-objcopy: command not found
+ xt-objcopy --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin
/home/esp8266/Share/esp_iot_sdk_v0.9.2/app/gen_misc.sh: line 12: xt-objcopy: command not found
+ xt-objcopy --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin
/home/esp8266/Share/esp_iot_sdk_v0.9.2/app/gen_misc.sh: line 13: xt-objcopy: command not found
+ xt-objcopy --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin
/home/esp8266/Share/esp_iot_sdk_v0.9.2/app/gen_misc.sh: line 14: xt-objcopy: command not found
+ ../../../../../tools/gen_appbin.py eagle.app.v6.out v6
sh: 1: xt-nm: not found
no entry point!!
Traceback (most recent call last):
File "../../../../../tools/gen_appbin.py", line 63, in <module>
cmd = 'genflashbin%s eagle.app.%s.text.bin '%(ver, ver)+entry_addr+' eagle.app.%s.data.bin '%(ver)+ data_start_addr+' eagle.app.%s.rodata.bin '%(ver)+rodata_start_addr
TypeError: cannot concatenate 'str' and 'NoneType' objects
+ cp eagle.app.v6.irom0text.bin ../../../../../bin/
+ cp eagle.app.v6.flash.bin ../../../../../bin/
+ cd ../../../../../


6. because of errors I checked if xt-objdump or xt-objcopy are accessible from command line and they are... besides as mentioned at the very beginning from command line ( LXTerminal ) I can compile with ./gen_misc.sh w/o any errors...

what am I doing wrong?
Thanks in advance!
User avatar
By zhivko
#11192 You probably need to create symbolic links that point to /bin folder of open esp sdk.

Probably something like:
ln -s esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-objdump esp-open-sdk/xtensa-lx106-elf/bin/xt-objdump

And than make sure you have esp-open-sdk/xtensa-lx106-elf/bin in your PATH.