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

User avatar
By jcmvbkbc
#1206
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.
User avatar
By kikko_fr
#1221
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...


Exactly the same over here. Thanks so much guys for sharing your knowledge and work. It's all super interesting and enable exciting experiments!
User avatar
By 0ff
#1225 Awesome, thank you! The fix works as intended, I can compile the IoT-Demo with no issues and with -mtext-section-literals.
User avatar
By reaper7
#1231 I got this error:
(prepared for ubuntu 12.04 64-bit from this tutorial: https://nurdspace.nl/ESP8266/First_setup)

Code: Select allr7@r7:/opt/Espressif/esp_sources/at$ make
CC driver/uart.c
CC user/at_baseCmd.c
CC user/at_cmd.c
CC user/at_ipCmd.c
CC user/at_port.c
CC user/at_wifiCmd.c
CC user/user_main.c
AR build/esp8266_at_app.a
LD build/esp8266_at.out
/opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lc
/opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lhal
collect2: error: ld returned 1 exit status
make: *** [build/esp8266_at.out] Error 1