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

User avatar
By wizhippo
#1187 I followed zarya's setup here:

https://nurdspace.nl/ESP8266/First_setup

I tried to following the example that is given and get:

Code: Select allCC driver/uart.c
In file included from /usr/include/string.h:25:0,
                 from /opt/Espressif/ESP8266_SDK/include/osapi.h:8,
                 from driver/uart.c:13:
/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory
 #  include <sys/cdefs.h>


looks like the headers are missing. Any idea what I am doing wrong?
User avatar
By cnlohr
#1189 Dunno, the code wouldn't fit when I was trying to compile things the conventional way. I switched the flags to the way I do it, and blam fits in with some space to spare.
User avatar
By wizhippo
#1190 FYI I got at demo to compile on Ubuntu 14.04 64-bit following:

https://nurdspace.nl/ESP8266/First_setup

You have to install libc6-dev-i386 to get the correct headers.

In /opt/Espressif/ESP8266_SDK/include/c_types.h I had to comment out

//typedef signed long int32_t;

Also have to copy the below to /opt/Espressif/ESP8266_SDK/lib

XtDevTools/install/builds/RC-2010.1-win32/lx106/xtensa-elf/lib/libc.a
XtDevTools/install/builds/RC-2010.1-win32/lx106/xtensa-elf/arch/lib/libhal.a

which I found in download/file.php?id=72

Good luck.
User avatar
By noelportugal
#1205 Ok guys,

After a lot of trial and error I was able to compile! I followed the instructions that @zarya posted (https://nurdspace.nl/ESP8266/First_setup ) and used the libs from @mamalala inside the SDK lib folder (/opt/Espressif/ESP8266_SDK/lib/). I used a VM with ubuntu 14.04.1 LTS 32-bit version. Also added "typedef unsigned long uint32_t;" under line 17 in "/opt/Espressif/ESP8266_SDK/include/c_types.h"

So kudos to all for your hard work!

Now I need to figure out how make changes like, CIPSERVER always on, set GPIO, etc...