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

User avatar
By viktak
#4644 HI All,

Last night I managed to go through all the preparations and installation of the toolchain as described in the wiki (https://github.com/esp8266/esp8266-wiki/wiki/Toolchain). All seemed to execute fine, without errors.
This morning I moved on to the Building part of the tutorial, but I got stuck at the very beginning: Compiling the example "Blinky" on page https://github.com/esp8266/esp8266-wiki/wiki/Building gives me this error:

Code: Select allviktor@Satellite-A300D /opt/Espressif/source-code-examples/blinky $ make
CC user/user_main.c
user/user_main.c:1:21: fatal error: ets_sys.h: No such file or directory
 #include "ets_sys.h"
                     ^
compilation terminated.
make: *** [build/user/user_main.o] Error 1
viktor@Satellite-A300D /opt/Espressif/source-code-examples/blinky $


It must be some PATH problem, because I do have the ets_sys.h file in the /opt/Espressif/ESP8266_SDK/esp_iot_sdk_v0.9.3/include directory.

Myabe some more experienced members could shed some light on this...

thanks!
User avatar
By viktak
#4741 @Tressie,

I'm afraid this doesn't help...

First I did what you suggested, same result. Then I looked up my directory structure and found that the missing file is not in the location you showed, but in "/opt/Espressif/ESP8266_SDK/esp_iot_sdk_v0.9.3/include". Changing $PATH to include this, however, still produces the same error as in the original post.
I double checked if $PATH is correct, and it seems so:
Code: Select allviktor@Satellite-A300D /opt/Espressif/source-code-examples/blinky $ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/Espressif/ESP8266_SDK/esp_iot_sdk_v0.9.3/include


And yes, I rebooted the computer every time I changed $PATH.

Any further ideas?
User avatar
By viktak
#4847 What a pity. Anyway, Thanks for your efforts, I'll try to get it to work and report back.

Also, can you point me to some other resources where I can find some working examples so that I can better understand the "little bugger"?