-->
Page 9 of 20

Re: Using GCC to program the ESP8266

PostPosted: Thu Sep 04, 2014 9:39 am
by Sprite_tm
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.

Re: Using GCC to program the ESP8266

PostPosted: Thu Sep 04, 2014 9:52 am
by jonsmirl
Do you have Linux makefiles?

Re: Using GCC to program the ESP8266

PostPosted: Thu Sep 04, 2014 10:08 am
by Squonk
Did someone actually tried to follow the exact instructions located in the overlay file itself?
viewtopic.php?f=9&t=19&start=10#p72

Re: Using GCC to program the ESP8266

PostPosted: Thu Sep 04, 2014 10:10 am
by Sprite_tm
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.