ESP32 Demo project and AWS set up.

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/awsmqttagent.o In file included from C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/awsmqttagent.c:47:0: C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/awsmqttagent.c: In function ‘prvSetupConnection’: C:/Users/thebi/FreeRTOS/amazon-freertos/lib/include/awssecuresockets.h:339:37: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] #define socketsAWSIOTALPNMQTT “x-amzn-mqtt-ca” ^ C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/awsmqttagent.c:859:27: note: in expansion of macro ‘socketsAWSIOTALPNMQTT’ char * ppcAlpns[] = { socketsAWSIOTALPNMQTT }; ^ C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/awsmqttagent.c: In function ‘MQTTAGENTInit’: C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/awsmqttagent.c:1907:25: error: implicit declaration of function ‘xQueueCreateStatic’ [-Werror=implicit-function-declaration] xCommandQueue = xQueueCreateStatic( mqttCOMMANDQUEUELENGTH, sizeof( MQTTEventDatat ), ucQueueStorageArea, &xStaticQueue ); ^ C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/awsmqttagent.c:1907:23: warning: assignment makes pointer from integer without a cast [-Wint-conversion] xCommandQueue = xQueueCreateStatic( mqttCOMMANDQUEUELENGTH, sizeof( MQTTEventDatat ), ucQueueStorageArea, &xStaticQueue ); ^ C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/awsmqttagent.c:1910:27: error: implicit declaration of function ‘xTaskCreateStatic’ [-Werror=implicit-function-declaration] xMQTTTaskHandle = xTaskCreateStatic( prvMQTTTask, “MQTT”, mqttconfigMQTTTASKSTACKDEPTH, NULL, mqttconfigMQTTTASKPRIORITY, xStack, &xStaticTask ); ^ C:/Users/thebi/FreeRTOS/amazon-freertos/lib/mqtt/awsmqttagent.c:1910:25: warning: assignment makes pointer from integer without a cast [-Wint-conversion] xMQTTTaskHandle = xTaskCreateStatic( prvMQTTTask, “MQTT”, mqttconfigMQTTTASKSTACKDEPTH, NULL, mqttconfigMQTTTASKPRIORITY, xStack, &xStaticTask ); ^ cc1.exe: some warnings being treated as errors make[1]: *** [/c/Users/thebi/FreeRTOS/amazon-freertos/lib/thirdparty/mcuvendor/espressif/esp-idf/make/componentwrapper.mk:286: lib/mqtt/awsmqttagent.o] Error 1 make: *** [/c/Users/thebi/FreeRTOS/amazon-freertos/demos/espressif/esp32devkitcespwroverkit/make/../../../../lib/thirdparty/mcuvendor/espressif/esp-idf/make/project.mk:477: component-amazon-freertos-common-build] Error 2 ~~~

ESP32 Demo project and AWS set up.

Sorry you are having these problems. To get you going I suggest you do the following: 1) Check configSUPPORTSTATICALLOCATION is set to 1 in FreeRTOSConfig.h. – The nnnCreateStatic() functions won’t be available otherwise. 2) Ensure FreeRTOS.h and then queue.h or tasks.h are included (as appropriate) at the top of the offending .c file. You can also turn off the option that treats warnings as errors – just so you can build. Longer term, to ensure this is investigated and fixed, open an issue here: https://github.com/aws/amazon-freertos/issues

ESP32 Demo project and AWS set up.

I think your static allocation suggestion was correct. In the menuconfig, I set [*] Enable FreeRTOS static allocation API and everything went straight through. Thanks a million. I’ll plough on now. My goal for this week is to get a comfortable IDE set up and running with a couple of tasks running, and hooking up to AWS over MQTT. Went back to the AWS espressif getting started page today, and did a double take. Looks like they’ve completely rewritten the ESP32 build process to use CMake. Checked the update on the page header, and it’s dated last night! Which is great news I guess. Quite a bit of effort is clearly being channeled into getting it working. There’s even talk of this approach working well with VS Code. I also stumbled on Neil Kolban’s ESP32 on Eclipse demo on youtube, which is awesome. I’m not 100% the information he presents there can be used with the AWS FreeRTOS code. Although, at the same time, I can’t see why not… With Amazon’s infinitly deep pockets, the huge popularity of the ESP devices, and the benefits that freeRTOS brings to embedded microprocessor design, I am confident that this is the future. So, I’ll stick with it!

ESP32 Demo project and AWS set up.

Went back to the AWS espressif getting started page today, and did a double take. Looks like they’ve completely rewritten the ESP32 build process to use CMake. Checked the update on the page header, and it’s dated last night!
Hmm… I was having problems running make flash monitor 2 days ago and submitted the Did this page help you? feedback at the bottom of the page with a short description of my issue. Today I see that the page has been updated, and I can successfully run the demos. Looks like the AWS team actually pays attention to submitted feedback! OR it’s just co-incidence.