Failure during link, smartconfig

HenryM
Posts: 15
Joined: Fri May 25, 2018 12:48 pm

Failure during link, smartconfig

Postby HenryM » Fri May 25, 2018 4:14 pm

I need a solution for configuring wifi and the smartconfig support looks like a good way to do it. However, I'm unable to get past the linking stage. I'm using Amazon FreeRTOS 1.2.6.

I've copied the example code (https://github.com/espressif/esp-idf/tr ... art_config) into my project, but when I build I'm getting link errors.

Code: Select all

➜  make git:(master) ✗ make
CC build/amazon-freertos-common/wifi.o
AR build/amazon-freertos-common/libamazon-freertos-common.a
LD build/aws_demos.elf
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.literal.airkiss_get_net_errno+0x4): undefined reference to `lwip_getsockopt_r'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.literal.KISS_Send_task+0xc): undefined reference to `lwip_htons'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.literal.KISS_Send_task+0x10): undefined reference to `lwip_socket'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.literal.KISS_Send_task+0x14): undefined reference to `lwip_setsockopt_r'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.literal.KISS_Send_task+0x18): undefined reference to `lwip_sendto_r'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.text.airkiss_get_net_errno+0x1b): undefined reference to `lwip_getsockopt_r'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.text.KISS_Send_task+0x26): undefined reference to `lwip_htons'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.text.KISS_Send_task+0x7f): undefined reference to `lwip_socket'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.text.KISS_Send_task+0xba): undefined reference to `lwip_setsockopt_r'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_airkiss.o):(.text.KISS_Send_task+0xda): undefined reference to `lwip_sendto_r'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.literal.TOUCH_Send_task+0xc): undefined reference to `ipaddr_addr'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.text.get_net_errno+0x1b): undefined reference to `lwip_getsockopt_r'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.text.TOUCH_Send_task+0x28): undefined reference to `ipaddr_addr'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.text.TOUCH_Send_task+0x3b): undefined reference to `lwip_htons'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.text.TOUCH_Send_task+0xcb): undefined reference to `lwip_socket'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.text.TOUCH_Send_task+0x106): undefined reference to `lwip_setsockopt_r'
/home/henrym/controller-0-10v/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/lib/libsmartconfig.a(sc_esptouch.o):(.text.TOUCH_Send_task+0x126): undefined reference to `lwip_sendto_r'
collect2: error: ld returned 1 exit status
/home/henrym/controller-0-10v/demos/espressif/esp32_devkitc_esp_wrover_kit/make/../../../../lib/third_party/mcu_vendor/espressif/esp-idf/make/project.mk:393: recipe for target '/home/henrym/controller-0-10v/demos/espressif/esp32_devkitc_esp_wrover_kit/make/build/aws_demos.elf' failed
make: *** [/home/henrym/controller-0-10v/demos/espressif/esp32_devkitc_esp_wrover_kit/make/build/aws_demos.elf] Error 1
➜  make git:(master) ✗ 
Does anyone know how to resolve this issue? I'm limited to one post per day on the Amazon AWS forums, so I'm hoping to find help here.

HenryM
Posts: 15
Joined: Fri May 25, 2018 12:48 pm

Re: Failure during link, smartconfig

Postby HenryM » Wed May 30, 2018 4:13 pm

My one post per day issue at AWS forums seems to have been lifted. The information I've received there is that lwIP is not supported in a:FreeRTOS. I do not expect it to be easy to get it working. Hopefully they add support to it soon.

ESP_Mahavir
Posts: 188
Joined: Wed Jan 24, 2018 6:51 am

Re: Failure during link, smartconfig

Postby ESP_Mahavir » Thu May 31, 2018 11:00 am

Hi HenryM,

Amazon FreeRTOS has its own TCP/IP stack, hence it is unlikely that there will be official support for lwIP stack. Having said that, if their TCP/IP stack had standard POSIX socket interface, then it would have been really straight forward to run ESP-IDF components like `smartconfig` in the context of a:FreeRTOS.

Also it would have been possible to adapt `smartconfig` component as per a:FreeRTOS secure socket layer, please refer here, https://github.com/aws/amazon-freertos/ ... _sockets.c, but again secure socket layer do not support UDP socket (required for sending ACK in `smartconfig` protocol) yet.

I will keep you updated as this needs to fixed sooner than later.

HenryM
Posts: 15
Joined: Fri May 25, 2018 12:48 pm

Re: Failure during link, smartconfig

Postby HenryM » Fri Jun 01, 2018 6:07 pm

At the current time, is there really a benefit to using a:FreeRTOS over ESP-IDF? The only thing I noticed was that their release appears to have GreenGrass support. The things that didn't work straight out of the box was SmartConfig, Bluetooth, OTA, and SNTP. That was enough to make me switch to ESP-IDF. I don't need GreenGrass yet, but in the future I will. I don't know what it'll take to implement it on my own.

My hope is that a:FreeRTOS catches up to ESP-IDF and has a compatible OTA update so I can switch to it when it has reached an acceptable maturity level.

Who is online

Users browsing this forum: Bing [Bot], StanInexeon and 147 guests