Page 1 of 1

Not able to build AWS OTA Demo for ESP32

Posted: Mon Aug 09, 2021 1:02 pm
by pratyushjagaty
I am not able to flash the initial version of Amazon FreeRTOS onto the ESP32 chip.

When I try to run the following command:

Code: Select all

idf.py -DVENDOR=espressif -DBOARD=esp32_devkitc -DCOMPILER=xtensa-esp32 build
I get the following error:

Code: Select all

/Users/jagaty/esp/esp-idf/components/newlib/platform_include/time.h:28:19: error: unknown type name 'clockid_t'; did you mean '_lock_t'?
 int clock_settime(clockid_t clock_id, const struct timespec *tp);
                   ^~~~~~~~~
                   _lock_t
/Users/jagaty/esp/esp-idf/components/newlib/platform_include/time.h:29:19: error: unknown type name 'clockid_t'; did you mean '_lock_t'?
 int clock_gettime(clockid_t clock_id, struct timespec *tp);
                   ^~~~~~~~~
                   _lock_t
/Users/jagaty/esp/esp-idf/components/newlib/platform_include/time.h:30:18: error: unknown type name 'clockid_t'; did you mean '_lock_t'?
 int clock_getres(clockid_t clock_id, struct timespec *res);
                  ^~~~~~~~~
                  _lock_t
In file included from /Users/jagaty/Documents/Experiments/OTA_Test/FreeRTOS/libraries/3rdparty/mbedtls/include/mbedtls/platform.h:68,
                 from /Users/jagaty/Documents/Experiments/OTA_Test/FreeRTOS/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c:18:
/Users/jagaty/Documents/Experiments/OTA_Test/FreeRTOS/libraries/3rdparty/mbedtls/include/mbedtls/platform_time.h:78:9: error: unknown type name 'time_t'
 typedef time_t mbedtls_time_t;
Ideally I should be able to able to build this and then flash onto my device.

System information
Hardware board: [https://shop.m5stack.com/products/esp32 ... a-x-ov3660](ESP32 DevkitC)
IDE used: VS Code & command line
Operating System: MacOS
Code version: latest - downloaded from AWS Console
Project/Demo: OTA

References:
Full stack trace on this link: https://github.com/aws/amazon-freertos/ ... /error.txt

Steps to reproduce the current status

Code: Select all

    Download FreeRTOS with OTA demo enabled from AWS console onto the MAC.
    ESP32 specific setup
    Complete the prerequisites
    Run idf.py -DVENDOR=espressif -DBOARD=esp32_devkitc -DCOMPILER=xtensa-esp32 build from the FreeRTOS directory.
Additional context
Similar issue: https://github.com/aws/amazon-freertos/ ... -769577330
Github issue: https://github.com/aws/amazon-freertos/issues/3347
But I cannot find any solution mentioned to the issue.

Would appreciate any help!