monkeytronics wrote on Saturday, June 15, 2019:
Hi, just starting out on my FreeRTOS journey. Went through the steps in AWS guide to get my ESP32-WROOM board running on freeRTOS. woring on windows. The demo program from espressif went thorugh fine. At this point, as per instructions, I had to remove the IDF_PATH variable, and move ahead through the AWS stuff. All looked good til the last step of running the demo: errors shown below. I haven’t touched a line of code, although I was promted to set several config settings: - some settings the verbosity of various reporting (0-7); multi blob support; support for mutex timed lock… The make script resumed after and failed when it tried to build aws-mqtt-agent. I really haven’t done anything at all except take it out of the box. Can anyone help me understand the reason it is failing to build. I read that the build normally shouldn’t have any warnings, so I’m assuming I not supposed to just change the settings to ignore warnings.
$ make
CC build/amazon-freertos-common/lib/mqtt/aws_mqtt_agent.o
In file included from C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/aws_mqtt_agent.c:47:0:
C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/aws_mqtt_agent.c: In function 'prvSetupConnection':
C:/Users/thebi/FreeRTOS/amazon-freertos/lib/include/aws_secure_sockets.h:339:37: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#define socketsAWS_IOT_ALPN_MQTT "x-amzn-mqtt-ca"
^
C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/aws_mqtt_agent.c:859:27: note: in expansion of macro 'socketsAWS_IOT_ALPN_MQTT'
char * ppcAlpns[] = { socketsAWS_IOT_ALPN_MQTT };
^
C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/aws_mqtt_agent.c: In function 'MQTT_AGENT_Init':
C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/aws_mqtt_agent.c:1907:25: error: implicit declaration of function 'xQueueCreateStatic' [-Werror=implicit-function-declaration]
xCommandQueue = xQueueCreateStatic( mqttCOMMAND_QUEUE_LENGTH, sizeof( MQTTEventData_t ), ucQueueStorageArea, &xStaticQueue );
^
C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/aws_mqtt_agent.c:1907:23: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
xCommandQueue = xQueueCreateStatic( mqttCOMMAND_QUEUE_LENGTH, sizeof( MQTTEventData_t ), ucQueueStorageArea, &xStaticQueue );
^
C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/aws_mqtt_agent.c:1910:27: error: implicit declaration of function 'xTaskCreateStatic' [-Werror=implicit-function-declaration]
xMQTTTaskHandle = xTaskCreateStatic( prvMQTTTask, "MQTT", mqttconfigMQTT_TASK_STACK_DEPTH, NULL, mqttconfigMQTT_TASK_PRIORITY, xStack, &xStaticTask );
^
C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/aws_mqtt_agent.c:1910:25: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
xMQTTTaskHandle = xTaskCreateStatic( prvMQTTTask, "MQTT", mqttconfigMQTT_TASK_STACK_DEPTH, NULL, mqttconfigMQTT_TASK_PRIORITY, xStack, &xStaticTask );
^
cc1.exe: some warnings being treated as errors
make[1]: *** [/c/Users/thebi/FreeRTOS/amazon-freertos/lib/third_party/mcu_vendor/espressif/esp-idf/make/component_wrapper.mk:286: lib/mqtt/aws_mqtt_agent.o] Error 1
make: *** [/c/Users/thebi/FreeRTOS/amazon-freertos/demos/espressif/esp32_devkitc_esp_wrover_kit/make/../../../../lib/third_party/mcu_vendor/espressif/esp-idf/make/project.mk:477: component-amazon-freertos-common-build] Error 2