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

User avatar
By GeorgeIoak
#18521 Unfortunately upgrading the the latest 1.1 SDK produces another error. I did a quick search for at_exeCmdCiupdate and didn't find any recent hits so I'm not sure why I'm apparently the only one with this compile error

Code: Select allvagrant@vagrant-ubuntu-trusty-64:~/esp-open-sdk/esp_iot_sdk_v1.1.0/at$ make COMPILE=gcc BOOT=new APP=1 SPI_SPEED=40 SPI
_MODE=QIO SPI_SIZE_MAP=4
make[1]: Entering directory `/home/vagrant/esp-open-sdk/esp_iot_sdk_v1.1.0/at/user'
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlon
gcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../../include/ets
-I ../include -I ../../include -I ../../include/eagle user_main.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlon
gcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../../include/ets
-I ../include -I ../../include -I ../../include/eagle at_upgrade.c
make[1]: Leaving directory `/home/vagrant/esp-open-sdk/esp_iot_sdk_v1.1.0/at/user'
make[1]: Entering directory `/home/vagrant/esp-open-sdk/esp_iot_sdk_v1.1.0/at/user'
xtensa-lx106-elf-gcc -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mte
xt-section-literals -ffunction-sections -fdata-sections  -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../in
clude -I ../../include -I ../../include/eagle  -o .output/eagle/debug/obj/at_upgrade.o -c at_upgrade.c
xtensa-lx106-elf-gcc -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mte
xt-section-literals -ffunction-sections -fdata-sections  -DICACHE_FLASH   -I include -I ./ -I ../../include/ets -I ../in
clude -I ../../include -I ../../include/eagle  -o .output/eagle/debug/obj/user_main.o -c user_main.c
xtensa-lx106-elf-ar ru .output/eagle/debug/lib/libuser.a .output/eagle/debug/obj/at_upgrade.o .output/eagle/debug/obj/us
er_main.o
xtensa-lx106-elf-ar: creating .output/eagle/debug/lib/libuser.a
make[1]: Leaving directory `/home/vagrant/esp-open-sdk/esp_iot_sdk_v1.1.0/at/user'
xtensa-lx106-elf-gcc  -L../lib -nostdlib -T../ld/eagle.app.v6.new.1024.app1.ld -Wl,--no-check-sections -u call_user_star
t -Wl,-static -Wl,--start-group -lc -lgcc -lhal -lphy -lpp -lnet80211 -llwip -lwpa -lmain -ljson -lupgrade -lsmartconfig
 user/.output/eagle/debug/lib/libuser.a                                  -lat -Wl,--end-group -o .output/eagle/debug/ima
ge/eagle.app.v6.out
user/.output/eagle/debug/lib/libuser.a(user_main.o):(.data.at_custom_cmd+0x2c): undefined reference to `at_exeCmdCiupdat
e'
collect2: error: ld returned 1 exit status
make: *** [.output/eagle/debug/image/eagle.app.v6.out] Error 1
User avatar
By GeorgeIoak
#18554 Yes, that was it, thank you! Why do we have to modify the files in the SDK? Is it because we are all using esp-open-sdk and Espressif people are not?

Is there anyone that can influence them to modify their code so it works for everyone?
User avatar
By esp03madness
#18560 no, it was a mistake on their (espressif's) part. Without that define everything in at_upgrade.c was discarded by the compiler as "dead code" (since you're building a static library - libuser.a). It has nothing to do with using esp-open-sdk. Which, is by the way just a neatly packaged and maintained collection of otherwise available "programs". It doesn't add to or change their functionality in any way.