Error while compiling Amazon FreeRTOS (Extra Components)

darshu wrote on July 05, 2018:

Hello,

I am using Amazon FreeRTOS on ESP32 Devkit C. The normal Amazon FreeRTOS is compiling fine.

I have added additional components such as CAN and Bluetooth.
CAN functionality is working as expected.

As I am trying to create a GATT server for BLE, I have added some more folders of the component directory of esp-idf such as esp32, soc and drivers to the espressif-code folder of AFR.

Now, I am getting this error when compiling:

LD build/aws_demos.elf
C:/AmazonFreeRTOS/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/esp32/lib\libpp.a(pp.o): In function `ppResortTxAMPDU':
(.iram1+0x16fc): undefined reference to `xQueueGenericReceive'
C:/AmazonFreeRTOS/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/esp32/lib\libpp.a(pp.o): In function `ppResortTxAMPDU':
(.iram1+0x174e): undefined reference to `xQueueGenericReceive'
C:/AmazonFreeRTOS/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/esp32/lib\libpp.a(pp.o): In function `pp_create_task':
(.text.pp_create_task+0x160): undefined reference to `xQueueGenericReceive'
C:/AmazonFreeRTOS/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/esp32/lib\libcoexist.a(coexist_core.o):(.iram1+0x3c): undefined reference to `xQueueGenericReceive'
C:/AmazonFreeRTOS/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/esp32/lib\libnet80211.a(ieee80211_ioctl.o):(.text.ieee80211_ioctl+0x4): undefined reference to `xQueueGenericReceive'
C:/AmazonFreeRTOS/demos/espressif/esp32_devkitc_esp_wrover_kit/common/application_code/espressif_code/esp32/lib\libnet80211.a(ieee80211_ioctl.o):(.text.ieee80211_ioctl+0x77): more undefined references to `xQueueGenericReceive' follow
collect2.exe: error: ld returned 1 exit status
make: *** [/C/AmazonFreeRTOS/demos/espressif/esp32_devkitc_esp_wrover_kit/make/../../../../lib/third_party/mcu_vendor/espressif/esp-idf/make/project.mk:394: /C/AmazonFreeRTOS/demos/espressif/esp32_devkitc_esp_wrover_kit/make/build/aws_demos.elf] Error 1

I am confused because, error is in .a (lib) file.
What is the possible solution?

Edited by: darshu on Jul 5, 2018 4:21 AM

Gaurav-Aggarwal-AWS wrote on July 05, 2018:

+xQueueGenericReceive+ was an internal function which used to be there till FreeRTOS Version 9 and was removed in FreeRTOS Version 10.
https://sourceforge.net/p/freertos/code/HEAD/tree/tags/V9.0.0rc2/FreeRTOS/Source/queue.c
https://sourceforge.net/p/freertos/code/HEAD/tree/tags/V10.0.0/FreeRTOS/Source/queue.c

You seem to be using a library which was compiled with an older version of FreeRTOS. Please try to replace it with a version compiled with the latest version of FreeRTOS.

In general, you should make sure that if you are using any pre-compiled libraries, they are compiled with the same version of FreeRTOS as the one you are using.

Hope that helps.

Thanks.

darshu wrote on July 06, 2018:

Hello,

Thanks a lot for reply.
It is working fine now!

mradula-aws wrote on July 09, 2018:

Good to hear that it is resolved.