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

User avatar
By erl
#3153 I've been banging my head against this for a number of hours now...

I've built the esp-open-sdk (after having to enlarge the VM's disk to fit the build). I tried to build it standalone and not.

I'm still getting link errors:
Code: Select all  [LD]        images/antares.elf
/home/esp8266/src/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lmain
/home/esp8266/src/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lnet80211
/home/esp8266/src/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lphy
/home/esp8266/src/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lpp
/home/esp8266/src/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lwpa
/home/esp8266/src/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lssl
/home/esp8266/src/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -llwip
collect2: error: ld returned 1 exit status
make: *** [images/antares.elf] Error 1


Should I build the esp-open-sdk standalone or not?
What exactly is Antares and how does it relate to Franekstein?
Should I be building this in the sdk's app directory? I didn't have to before.
How do I get Frankenstein to use the esp-open-sdk SDK libraries? They are in /home/esp8266/src/esp-open-sdk/sdk/lib.
I tried adding:
Code: Select allCONFIG_LDFLAGS="-L/home/esp8266/src/esp-open-sdk/sdk/lib"

manually to .config in esp8266-frankenstein to no avail.

Could you please give detailed build instructions on a fresh system? Thanks. I don't know what I'm missing.
User avatar
By flyingboulet
#3161 Hi,

I've added COMMON_LDFLAGS="-L/opt/Espressif/esp_iot_sdk_v0.9.2/lib/" to the top Makefile, it makes ld find most of the libs...
But still /opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lpp

In fact, no libpp in 0.9.2 libs... There's one in 0.9.3. Is Antares to be build against 0.9.3?

Vincent

My system is a native 64 bits archlinux...
User avatar
By Necromant
#3162 You need standalone SDK, sorry I had to enforce that for the sake of simplicity for now.
Code: Select allmake STANDALONE=y

'Standalone' build places all libraries and headers into the toolchain itself, so you need no additional magic.

What exactly is Antares and how does it relate to Franekstein?

Antares is my buildsystem+library code I use for all embedded projects. Since kconfig/menuconfig requires a plenty of makefile magic to use properly, so I made antares in a way so that I can reuse it for every project with zero effort.
For frankenstein it only provides (for now) menuconfig/nconfig targets and a few library code snipplets from there.

I've added a README.hacking to the repo with detailed instructions on setting up build environment. I should've done that it in the first place, sorry. Hope it helps.