darshu wrote on July 06, 2018:
I am working with a use case where I get data from BLE,and send it to AWS IoT over WiFi using ESP32.
Seperately, both components are working fine.
For example, I have created GATT server in ESP32 and BLE communication is working as expected.
Similarly, ESP32 is running fine with AFR and communicates with AWS IoT.
To integrate it, I added Bluetooth (bt) component to esp-idf folder in third_party folder.
Because of some dependencies, I had to add newlib and lwip components too.
However, now when I compile, I get errors as many variables that are defined in lwip are already defined in tcpip_adapter component which is already present.
What can be the optimum way in which I can use both BLE and WiFi together with Amazon FreeRTOS? Also, does it make sense to replace esp-idf folder by the latest esp-idf from github repository?
Thanks in advnace!
Update: I managed to remove the overlapping functions between lwip and tcpip_adapter. Now The compilation is almost happening. However, I had to upgrade some functions in components/esp32. Now, I am getting library errors after the compilation is complete.
FYI, I am using the Amazon FreeRTOS from github repo. Here is the log after compilation.
C:/AmazonFreeRTOS1/demos/espressif/esp32_devkitc_esp_wrover_kit/make/build/tcpip_adapter\libtcpip_adapter.a(tcpip_adapter.o):(.rodata.ethbroadcast+0x0): multiple definition of `ethbroadcast' C:/AmazonFreeRTOS1/demos/espressif/esp32_devkitc_esp_wrover_kit/make/build/lwip\liblwip.a(ethernet.o):(.rodata.ethbroadcast+0x0): first defined here C:/AmazonFreeRTOS1/demos/espressif/esp32_devkitc_esp_wrover_kit/make/build/esp32\libesp32.a(phy_init.o):(.literal.esp_phy_rf_init+0x8): undefined reference to `g_wifi_osi_funcs' C:/AmazonFreeRTOS1/demos/espressif/esp32_devkitc_esp_wrover_kit/make/build/esp32\libesp32.a(phy_init.o):(.literal.esp_phy_rf_init+0x10): undefined reference to `wifi_osi_funcs_register' C:/AmazonFreeRTOS1/demos/espressif/esp32_devkitc_esp_wrover_kit/make/build/esp32\libesp32.a(phy_init.o): In function `esp_phy_rf_init': C:/AmazonFreeRTOS1/lib/third_party/mcu_vendor/espressif/esp-idf/components/esp32/phy_init.c:347: undefined reference to `wifi_osi_funcs_register' C:/AmazonFreeRTOS1/demos/espressif/esp32_devkitc_esp_wrover_kit/make/build/amazon-freertos-common\libamazon-freertos-common.a(aws_wifi.o):(.literal.WIFI_On+0x14): undefined reference to `g_wifi_osi_funcs' collect2.exe: error: ld returned 1 exit status make: *** [/C/AmazonFreeRTOS1/demos/espressif/esp32_devkitc_esp_wrover_kit/make/../../../../lib/third_party/mcu_vendor/espressif/esp-idf/make/project.mk:394: /C/AmazonFreeRTOS1/demos/espressif/esp32_devkitc_esp_wrover_kit/make/build/aws_demos.elf] Error 1