I have installed toolchain in /opt/Espressif and made the symlinks to xt-xcc etc and get the following error:
make[1]: Entering directory '/opt/Espressif/nodemcu-firmware/app/user'
DEPEND: xt-xcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH -DLWIP_OPEN_SRC -DPBUF_RSV_FOR_WLAN -DEBUF_LWIP -I include -I ./ -I ../../include/ets -I ../libc -I ../platform -I ../lua -I ../wofs -I ../include -I ./ -I ../../include -I ../../include/eagle user_main.c
In file included from ../libc/c_string.h:10:0,
from user_main.c:13:
../../include/osapi.h:8:20: fatal error: string.h: No such file or directory
#include <string.h>
^
compilation terminated.
After adding /opt/Espressif/ESP8266_SDK/include to the Makefile:
INCLUDES := $(INCLUDES) -I $(PDIR)include -I $(PDIR)include/$(TARGET) -I /opt/Espressif/ESP8266_SDK/include
there is another error:
make[1]: Entering directory '/opt/Espressif/nodemcu-firmware/app'
make[2]: Entering directory '/opt/Espressif/nodemcu-firmware/app/user'
DEPEND: xt-xcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH -DLWIP_OPEN_SRC -DPBUF_RSV_FOR_WLAN -DEBUF_LWIP -I include -I ./ -I ../../include/ets -I ../libc -I ../platform -I ../lua -I ../wofs -I ../include -I ./ -I ../../include -I ../../include/eagle -I /opt/Espressif/ESP8266_SDK/include user_main.c
In file included from /opt/Espressif/ESP8266_SDK/include/fcntl.h:1:0,
from ../libc/c_fcntl.h:4,
from ../wofs/romfs.h:7,
from user_main.c:17:
/opt/Espressif/ESP8266_SDK/include/sys/fcntl.h:31:34: fatal error: xtensa/simcall-fcntl.h: No such file or directory
#include <xtensa/simcall-fcntl.h>
^
compilation terminated.
the file simcall-fcntl.h is not found.