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

User avatar
By Marshall
#11824 I was getting the same error as the original post. I was using the make command that is given in the README.md, namely:
Code: Select allmake SDK_BASE="/opt/Espressif/ESP8266_SDK" FLAVOR="release" all


I put this line into the Makefile at line 168 to see what compiler command was actually being generated:
Code: Select all        $(vecho) "Compiler CMD [$(Q) $(CC) $(INCDIR) $(MODULE_INCDIR) $(EXTRA_INCDIR) $(SDK_INCDIR) $(CFLAGS)"


That showed me that it was attempting to include directories that did not exist, which showed me in turn that my /opt/Espressif/ESP8266_SDK/ directory was not setup for "make SDK_BASE=/opt/Espressif/ESP8266_SDK". I had the espressif SDK in a directory path like this: /opt/Espressif/ESP8266_SDK/esp_iot_sdk_v0.9.5. To make the compile work I had to invoke make like this:

Code: Select allmake SDK_BASE="/opt/Espressif/ESP8266_SDK/esp_iot_sdk_v0.9.5" FLAVOR="release" all


Then the compile worked perfectly. Hope this helps. Marshall
User avatar
By LuisCampos
#21829 Hi

I ran in to the same issue, it worked yesterday but not today. By enabling log in the make file I saw that the make file is calling the following line which has the include folders:

/opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc -Idriver -Iuser -Idriver/include -Iuser/include -Iinclude -I/opt/Espressif/ESP8266_SDK/include -I/opt/Espressif/ESP8266_SDK/include/json -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH -c $< -o $@

however gcc shows the following error line

/opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static user/user_main.c -o user/user_main

which someone doesn’t have the include folders, running the first line in the shell works, I will try to find why gcc is stripping the include folders