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

User avatar
By Sprite_tm
#165 Yes, I know this. That is the way to obtain a perfectly good compiler WHICH WILL NOT LINK AGAINST THE ESP8266 PRECOMPILED SDK LIBS. If you have proven otherwise, I'd like to hear it.
User avatar
By Sprite_tm
#168 Yes. The Makefiles actually are GNU make files; they just point to the Xtensa tools and there's an inconsistency in the directory structure. My notes on fixing them:

Code: Select allModify makefile: xt- -> xtensa-unknown-elf- and xcc -> gcc
Move examples/iot_sdk_v0.6 to iotdemo

Add include/string.h. Contents:
----8<---
extern char *strcpy(char *s1, const char *s2);
extern char *strncpy(char *s1, const char *s2, unsigned int n);
extern int   strcmp(const char *s1, const char *s2);
extern int   strncmp(const char *s1, const char *s2, unsigned int n);
extern int   strlen(const char *s);
----8<---


To compile them, you ofcourse need the xtensa-unknown-elf-whatever tools in your path. Then just run 'make' in the 'iotdemo' dir.