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

User avatar
By kikko_fr
#1232 @reaper7 Yeah the tutorial is missing one step described by @mamalala which is to copy the libc and libhal from the original VM's.
You can find further instructions and a link to download these files in his post on page 3.
User avatar
By Squonk
#1235
jcmvbkbc wrote:
jcmvbkbc wrote:
Squonk wrote:I have the issue when compiling dumbcraft's "dumbutils.c" from https://github.com/cnlohr/dumbcraft8266
This is using your latest crosstoll-NG from github.
Hope it helps!

Thanks. Confirmed assembler issue. Will fix.

Turns out to be a feature: assembler implicitly creates .literal_position at every entry instruction. I've added explicit .literal_position emitting in gcc for call0 ABI.
gcc and crosstool repos are updated with the fix; now gcc should be able to build code with -mtext-section-literals.

I confirm it is now working!

Thanks a lot!
User avatar
By yeti
#1236
reaper7 wrote:(prepared for ubuntu 12.04 64-bit from this tutorial: https://nurdspace.nl/ESP8266/First_setup)
If it works for you, my problems seem not to be 64-bit related as I assumed up to now...
I tried to build the toolchain on Debian-64bit-Squeeze-LTE, -Wheezy and -Jessie running into the same problem when trying to build the example:
Code: Select all(yeti@darkstar:8)~/wrk/esp_sources/at$ LANG=C make
CC user/at_ipCmd.c
In file included from /usr/include/stdlib.h:320:0,
                 from user/at_ipCmd.c:9:
/usr/include/sys/types.h:189:15: error: conflicting types for 'int32_t'
   typedef int int##N##_t __attribute__ ((__mode__ (MODE)))
               ^
/usr/include/sys/types.h:197:1: note: in expansion of macro '__intN_t'
 __intN_t (32, __SI__);
 ^
In file included from user/at_ipCmd.c:1:0:
/opt/Espressif/ESP8266_SDK/include/c_types.h:17:29: note: previous declaration of 'int32_t' was here
 typedef signed long         int32_t;
                             ^
make: *** [build/user/at_ipCmd.o] Error 1


(I do not have ESP8266s yet... I bet they will take weeks to make their way from dot-HK to dot-DE but I want to get the toolchain running before they arrive...)