Fatal error: cstdint: No such file or directory

Thank you for the response, I referred the AWS documentation and used this command, I am not sure how to use C++ complier.

idf.py -DVENDOR=espressif -DBOARD=esp32_wrover_kit -DCOMPILER=xtensa-esp32 build

For better understanding, I first ported this library into AWS freertos (It is written in cpp) and then tried to build and make the project using above command. Please help me out for the same.

This is how the output looks

amazon-freertos$ idf.py -DVENDOR=espressif -DBOARD=esp32_wrover_kit -DCOMPILER=xtensa-esp32 build
Executing action: all (aliases: build)
Running cmake in directory /home/mohit/Documents/amazon-freertos/build
Executing "cmake -G 'Unix Makefiles' -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DVENDOR=espressif -DBOARD=esp32_wrover_kit -DCOMPILER=xtensa-esp32 -DCCACHE_ENABLE=0 /home/mohit/Documents/amazon-freertos"...
-- Submodule update
Skipping submodule '../../../libraries/abstractions/backoff_algorithm/'
Skipping submodule '../../../../libraries/abstractions/pkcs11/corePKCS11/'
Skipping submodule '../../../libraries/abstractions/pkcs11/corePKCS11/'
Skipping submodule '../../../libraries/abstractions/pkcs11/corePKCS11/'
Skipping submodule '../../../libraries/abstractions/pkcs11/corePKCS11/'
Skipping submodule '../../../libraries/coreHTTP/'
Skipping submodule '../../../libraries/coreHTTP/'
Skipping submodule '../../../libraries/coreHTTP/'
Skipping submodule '../../../libraries/coreJSON/'
Skipping submodule '../../../libraries/coreJSON/'
Skipping submodule '../../../libraries/coreJSON/'
Skipping submodule '../../../libraries/coreMQTT/'
Skipping submodule '../../../libraries/coreMQTT/'
Skipping submodule '../../../libraries/coreMQTT/'
Skipping submodule '../../../libraries/device_defender_for_aws/'
Skipping submodule '../../../libraries/device_defender_for_aws/'
Skipping submodule '../../../libraries/device_defender_for_aws/'
Skipping submodule '../../../libraries/device_shadow_for_aws/'
Skipping submodule '../../../libraries/device_shadow_for_aws/'
Skipping submodule '../../../libraries/device_shadow_for_aws/'
Skipping submodule '../../libraries/freertos_plus/standard/freertos_plus_tcp/'
Skipping submodule '../../libraries/freertos_plus/standard/freertos_plus_tcp/'
Skipping submodule '../../libraries/freertos_plus/standard/freertos_plus_tcp/'
Skipping submodule '../../../libraries/jobs_for_aws/'
Skipping submodule '../../../libraries/jobs_for_aws/'
Skipping submodule '../../../libraries/jobs_for_aws/'
WARNING: IDF_PATH environment variable is not cleared.
    If CMake is generating an error, consider clearing the IDF_PATH environment
    variable, and generating a clean build. This message can be ignored if
    CMake was successful.
-- Component directory /home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/mbedtls does not contain a CMakeLists.txt file. No component will be added
-- Component directory /home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/unity does not contain a CMakeLists.txt file. No component will be added
-- Checking Python dependencies...
Python requirements from /home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/requirements.txt are satisfied.
Loading defaults file /home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults...
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:21 CONFIG_NIMBLE_ENABLED was replaced with CONFIG_BT_NIMBLE_ENABLED
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:22 CONFIG_NIMBLE_MAX_CONNECTIONS was replaced with CONFIG_BT_NIMBLE_MAX_CONNECTIONS
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:23 CONFIG_NIMBLE_MAX_BONDS was replaced with CONFIG_BT_NIMBLE_MAX_BONDS
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:24 CONFIG_NIMBLE_MAX_CCCDS was replaced with CONFIG_BT_NIMBLE_MAX_CCCDS
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:25 CONFIG_NIMBLE_L2CAP_COC_MAX_NUM was replaced with CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:26 CONFIG_NIMBLE_PINNED_TO_CORE was replaced with CONFIG_BT_NIMBLE_PINNED_TO_CORE
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:27 CONFIG_NIMBLE_ROLE_CENTRAL was replaced with CONFIG_BT_NIMBLE_ROLE_CENTRAL
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:28 CONFIG_NIMBLE_ROLE_PERIPHERAL was replaced with CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:29 CONFIG_NIMBLE_ROLE_BROADCASTER was replaced with CONFIG_BT_NIMBLE_ROLE_BROADCASTER
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:30 CONFIG_NIMBLE_ROLE_OBSERVER was replaced with CONFIG_BT_NIMBLE_ROLE_OBSERVER
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:31 CONFIG_NIMBLE_NVS_PERSIST was replaced with CONFIG_BT_NIMBLE_NVS_PERSIST
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:32 CONFIG_NIMBLE_SM_LEGACY was replaced with CONFIG_BT_NIMBLE_SM_LEGACY
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:33 CONFIG_NIMBLE_SM_SC was replaced with CONFIG_BT_NIMBLE_SM_SC
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:34 CONFIG_NIMBLE_DEBUG was replaced with CONFIG_BT_NIMBLE_DEBUG
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:35 CONFIG_NIMBLE_SVC_GAP_DEVICE_NAME was replaced with CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:36 CONFIG_NIMBLE_GAP_DEVICE_NAME_MAX_LEN was replaced with CONFIG_BT_NIMBLE_GAP_DEVICE_NAME_MAX_LEN
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:37 CONFIG_NIMBLE_ATT_PREFERRED_MTU was replaced with CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:38 CONFIG_NIMBLE_SVC_GAP_APPEARANCE was replaced with CONFIG_BT_NIMBLE_SVC_GAP_APPEARANCE
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:39 CONFIG_NIMBLE_ACL_BUF_COUNT was replaced with CONFIG_BT_NIMBLE_ACL_BUF_COUNT
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:40 CONFIG_NIMBLE_ACL_BUF_SIZE was replaced with CONFIG_BT_NIMBLE_ACL_BUF_SIZE
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:41 CONFIG_NIMBLE_HCI_EVT_BUF_SIZE was replaced with CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:42 CONFIG_NIMBLE_HCI_EVT_HI_BUF_COUNT was replaced with CONFIG_BT_NIMBLE_HCI_EVT_HI_BUF_COUNT
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:43 CONFIG_NIMBLE_HCI_EVT_LO_BUF_COUNT was replaced with CONFIG_BT_NIMBLE_HCI_EVT_LO_BUF_COUNT
/home/mohit/Documents/amazon-freertos/build/sdkconfig.defaults:44 CONFIG_NIMBLE_MESH was replaced with CONFIG_BT_NIMBLE_MESH
/tmp/confgen_tmp5qyizk3_:20 line was updated to CONFIG_BT_BLUEDROID_ENABLED=n
/tmp/confgen_tmp5qyizk3_:34 line was updated to CONFIG_BT_NIMBLE_DEBUG=n
/tmp/confgen_tmp5qyizk3_:44 line was updated to CONFIG_BT_NIMBLE_MESH=n
-- App "amazon-freertos" version: 1
-- Adding linker script /home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script /home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/mohit/Documents/amazon-freertos/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script /home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/esp32/ld/esp32.project.ld.in
-- Adding linker script /home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/esp32/ld/esp32.peripherals.ld
=========================Resolving dependencies==========================
module disabled: posix
reason:          posix::mcu_port is not defined by vendor.
dependency path: posix->posix::mcu_port


====================Configuration for FreeRTOS====================
  Version:                 202012.00
  Git version:             202012.00-295-g36a873a8a

Target microcontroller:
  vendor:                  Espressif
  board:                   ESP-WROVER-KIT
  description:             Development board produced by Espressif that has support for 
                           LCD, MicroSD card, and USB JTAG interface. It comes in two 
                           variants either with ESP-WROOM-32 or ESP32-WROVER module.
  family:                  ESP32
  data ram size:           520KB
  program memory size:     4MB

Host platform:
  OS:                      Linux-5.8.0-48-generic
  Toolchain:               xtensa-esp32
  Toolchain path:          /home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/
                           xtensa-esp32-elf
  CMake generator:         Unix Makefiles

FreeRTOS modules:
  Modules to build:        backoff_algorithm, ble, ble_hal, ble_wifi_provisioning, 
                           common, common_io, core_http, core_http_demo_dependencies, 
                           core_json, core_mqtt, core_mqtt_demo_dependencies, crypto, 
                           defender, dev_mode_key_provisioning, device_defender, 
                           device_defender_demo_dependencies, device_shadow, 
                           device_shadow_demo_dependencies, freertos_cli_plus_uart, 
                           freertos_plus_cli, greengrass, http_demo_helpers, https, jobs, 
                           jobs_demo_dependencies, kernel, logging, mqtt, mqtt_demo_
                           helpers, ota, pkcs11, pkcs11_helpers, pkcs11_implementation, 
                           pkcs11_utils, platform, secure_sockets, serializer, shadow, 
                           tls, transport_interface_secure_sockets, wifi
  Enabled by user:         ble, ble_hal, ble_wifi_provisioning, common_io, core_http_demo_
                           dependencies, core_json, core_mqtt_demo_dependencies, 
                           defender, device_defender, device_defender_demo_dependencies, 
                           device_shadow, device_shadow_demo_dependencies, freertos_cli_
                           plus_uart, freertos_plus_cli, greengrass, https, jobs, 
                           jobs_demo_dependencies, logging, ota, pkcs11, pkcs11_helpers, 
                           pkcs11_implementation, pkcs11_utils, platform, secure_sockets, 
                           shadow, wifi
  Enabled by dependency:   backoff_algorithm, common, core_http, core_mqtt, crypto, 
                           demo_base, dev_mode_key_provisioning, freertos, http_demo_
                           helpers, kernel, mqtt, mqtt_demo_helpers, ota_http, ota_mqtt, 
                           pkcs11_mbedtls, serializer, tls, transport_interface_secure_
                           sockets, utils
  3rdparty dependencies:   jsmn, mbedtls, pkcs11, tinycbor
  Available demos:         demo_cli_uart, demo_core_http, demo_core_mqtt, demo_device_
                           defender, demo_device_shadow, demo_gatt_server, demo_
                           greengrass_connectivity, demo_jobs, demo_mqtt_ble, 
                           demo_numeric_comparison, demo_ota, demo_shadow_ble, demo_tcp, 
                           demo_wifi_provisioning
  Available tests:         
=========================================================================

-- Configuring done
-- Generating done
-- Build files have been written to: /home/mohit/Documents/amazon-freertos/build
Running make in directory /home/mohit/Documents/amazon-freertos/build
Executing "make -j 6 all"...
Consolidate compiler generated dependencies of target afr_kernel
Consolidate compiler generated dependencies of target afr_3rdparty_tinycbor
[  0%] Built target partition_table_bin
[  0%] Built target blank_ota_data
[  0%] Building C object CMakeFiles/afr_kernel.dir/freertos_kernel/event_groups.c.obj
[  0%] Built target esp32_linker_script
[  0%] Building C object CMakeFiles/afr_kernel.dir/freertos_kernel/list.c.obj
[  0%] Building C object CMakeFiles/afr_kernel.dir/freertos_kernel/queue.c.obj
[  1%] Built target afr_3rdparty_tinycbor
[  1%] Performing build step for 'bootloader'
[  1%] Building C object CMakeFiles/afr_kernel.dir/freertos_kernel/stream_buffer.c.obj
[  1%] Building C object CMakeFiles/afr_kernel.dir/freertos_kernel/tasks.c.obj
[  4%] Built target __idf_log
[  5%] Built target _project_elf_src
[  1%] Building C object CMakeFiles/afr_kernel.dir/freertos_kernel/timers.c.obj
[ 20%] Built target soc_esp32
[ 65%] Built target __idf_soc
[ 67%] Built target __idf_micro-ecc
[ 84%] Built target __idf_bootloader_support
[ 92%] Built target __idf_efuse
[ 94%] Built target __idf_spi_flash
[ 96%] Built target __idf_main
[ 99%] Built target bootloader.elf
[100%] Built target gen_project_binary
[100%] Built target app
[  1%] No install step for 'bootloader'
[  1%] Completed 'bootloader'
[  2%] Built target bootloader
[  2%] Linking C static library afr_kernel.a
[  2%] Built target afr_kern
[  2%] Building C object CMakeFiles/afr_jobs.dir/libraries/jobs_for_aws/source/jobs.c.obj
[  2%] Building C object CMakeFiles/afr_pkcs11_utils.dir/libraries/abstractions/pkcs11/corePKCS11/source/core_pki_utils.c.obj
Consolidate compiler generated dependencies of target afr_common_io
[  2%] Building C object CMakeFiles/afr_backoff_algorithm.dir/libraries/abstractions/backoff_algorithm/source/backoff_algorithm.c.obj
[  2%] Building C object CMakeFiles/afr_freertos_plus_cli.dir/libraries/freertos_plus/standard/freertos_plus_cli/source/FreeRTOS_CLI.c.obj
[  2%] Building C object CMakeFiles/afr_common_io.dir/vendors/espressif/boards/ports/common_io/iot_i2c.c.obj
[  2%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/aes.c.obj
[  2%] Linking C static library afr_pkcs11_utils.a
[  2%] Linking C static library afr_backoff_algorithm.a
[  2%] Linking C static library afr_jobs.a
[  2%] Built target afr_pkcs11_utils
[  2%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/aesni.c.obj
[  2%] Built target afr_jobs
[  2%] Building C object CMakeFiles/afr_common_io.dir/vendors/espressif/boards/ports/common_io/iot_spi.c.obj
[  2%] Built target afr_backoff_algorithm
[  2%] Building C object CMakeFiles/afr_common_io.dir/vendors/espressif/boards/ports/common_io/iot_uart.c.obj
[  2%] Building C object CMakeFiles/afr_freertos_plus_cli.dir/libraries/freertos_plus/standard/freertos_plus_cli/source/FreeRTOS_CLI_Console.c.obj
[  2%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/arc4.c.obj
[  2%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/aria.c.obj
[  2%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/asn1parse.c.obj
[  2%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/asn1write.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/base64.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/bignum.c.obj
[  3%] Linking C static library afr_freertos_plus_cli.a
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/blowfish.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/camellia.c.obj
[  3%] Built target afr_freertos_plus_cli
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ccm.c.obj
[  3%] Linking C static library afr_common_io.a
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/certs.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/chacha20.c.obj
[  3%] Built target afr_common_io
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/chachapoly.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/cipher_wrap.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/cipher.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/cmac.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ctr_drbg.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/debug.c.obj
Consolidate compiler generated dependencies of target afr_freertos_cli_plus_uart
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/des.c.obj
[  3%] Building C object CMakeFiles/afr_freertos_cli_plus_uart.dir/libraries/freertos_plus/standard/freertos_plus_cli/uart/FreeRTOS_CLI_UART.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/dhm.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ecdsa.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ecdh.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ecjpake.c.obj
[  3%] Building C object CMakeFiles/afr_freertos_cli_plus_uart.dir/vendors/espressif/boards/ports/common_io/iot_i2c.c.obj
[  3%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ecp.c.obj
[  4%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ecp_curves.c.obj
[  4%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/entropy.c.obj
[  5%] Building C object CMakeFiles/afr_freertos_cli_plus_uart.dir/vendors/espressif/boards/ports/common_io/iot_spi.c.obj
[  5%] Building C object CMakeFiles/afr_freertos_cli_plus_uart.dir/vendors/espressif/boards/ports/common_io/iot_uart.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/entropy_poll.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/error.c.obj
[  5%] Linking C static library afr_freertos_cli_plus_uart.a
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/gcm.c.obj
[  5%] Built target afr_freertos_cli_plus_uart
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/havege.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/hkdf.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/hmac_drbg.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/md.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/md2.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/md4.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/md_wrap.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/md5.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/memory_buffer_alloc.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/net_sockets.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/nist_kw.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/oid.c.obj
[  5%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/padlock.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/pem.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/pk.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/pk_wrap.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/pkcs11.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/pkcs12.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/pkcs5.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/pkparse.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/pkwrite.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/platform.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/platform_util.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/poly1305.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ripemd160.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/rsa.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/rsa_internal.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/sha1.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/sha256.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/sha512.c.obj
[  6%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ssl_cache.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ssl_ciphersuites.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ssl_cli.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ssl_cookie.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ssl_srv.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ssl_ticket.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ssl_tls.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/threading.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/timing.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/version.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/version_features.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/x509.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/x509_crl.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/x509_create.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/x509_crt.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/x509_csr.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/x509write_crt.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/x509write_csr.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/xtea.c.obj
[  7%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls_utils/mbedtls_utils.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls_utils/mbedtls_error.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/__/__/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/__/__/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/__/__/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/__/__/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/__/__/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/__/__/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/__/__/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/__/__/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/__/__/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/__/__/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/__/__/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/__/__/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[  8%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/__/__/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[  8%] Linking C static library libafr_3rdparty_mbedtls.a
[  8%] Built target afr_3rdparty_mbedtls
[  8%] Building C object CMakeFiles/afr_crypto.dir/libraries/freertos_plus/standard/crypto/src/iot_crypto.c.obj
[  8%] Building C object CMakeFiles/afr_crypto.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[  8%] Building C object CMakeFiles/afr_crypto.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[  8%] Built target __idf_ulp
Consolidate compiler generated dependencies of target __idf_esp_http_server
[  8%] Building C object CMakeFiles/afr_crypto.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[  8%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/boards/ports/wifi/iot_wifi.c.obj
[  9%] Built target __idf_esp_http_server
Consolidate compiler generated dependencies of target __idf_esp_http_client
[  9%] Building C object CMakeFiles/afr_crypto.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[  9%] Building C object CMakeFiles/afr_crypto.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[  9%] Building C object CMakeFiles/afr_crypto.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 10%] Built target __idf_esp_http_client
[ 10%] Building C object CMakeFiles/afr_crypto.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 10%] Building C object CMakeFiles/afr_crypto.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
Consolidate compiler generated dependencies of target __idf_tcp_transport
[ 10%] Building C object CMakeFiles/afr_crypto.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 10%] Building C object CMakeFiles/afr_crypto.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 10%] Building C object CMakeFiles/afr_crypto.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 11%] Built target __idf_tcp_transport
[ 12%] Building C object CMakeFiles/afr_crypto.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 13%] Built target __idf_esp-tls
[ 13%] Building C object CMakeFiles/afr_crypto.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 13%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/boards/ports/wifi/iot_softap_wifi_provisioning.c.obj
[ 13%] Building C object CMakeFiles/afr_wifi.dir/libraries/coreHTTP/source/dependency/3rdparty/http_parser/http_parser.c.obj
[ 14%] Built target __idf_nghttp
Consolidate compiler generated dependencies of target __idf_app_trace
[ 14%] Built target __idf_app_trace
Consolidate compiler generated dependencies of target __idf_cxx
[ 14%] Built target __idf_cxx
[ 14%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/protobuf-c/protobuf-c/protobuf-c/protobuf-c.c.obj
Consolidate compiler generated dependencies of target __idf_newlib
[ 14%] Linking C static library afr_crypto.a
[ 15%] Built target __idf_newlib
[ 15%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/protocomm/proto-c/session.pb-c.c.obj
[ 15%] Built target afr_crypto
[ 15%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/protocomm/proto-c/sec0.pb-c.c.obj
[ 16%] Built target __idf_freertos
Consolidate compiler generated dependencies of target __idf_esp_timer
[ 16%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/protocomm/proto-c/sec1.pb-c.c.obj
[ 16%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/protocomm/proto-c/constants.pb-c.c.obj
[ 16%] Built target __idf_esp_timer
Consolidate compiler generated dependencies of target __idf_esp_common
[ 17%] Built target __idf_esp_common
[ 17%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/protocomm/src/security/security1.c.obj
[ 18%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/protocomm/src/common/protocomm.c.obj
Consolidate compiler generated dependencies of target __idf_esp32
[ 18%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/protocomm/src/transports/protocomm_httpd.c.obj
[ 20%] Built target __idf_esp32
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/wifi_provisioning/proto-c/wifi_config.pb-c.c.obj
Consolidate compiler generated dependencies of target __idf_perfmon
[ 20%] Built target __idf_perfmon
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/wifi_provisioning/src/wifi_config.c.obj
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/wifi_provisioning/proto-c/wifi_constants.pb-c.c.obj
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 20%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 21%] Building C object CMakeFiles/afr_wifi.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
Consolidate compiler generated dependencies of target __idf_espcoredump
[ 22%] Built target __idf_espcoredump
Consolidate compiler generated dependencies of target __idf_pthread
[ 23%] Built target __idf_pthread
Consolidate compiler generated dependencies of target __idf_driver
[ 23%] Linking C static library afr_wifi.a
[ 25%] Built target __idf_driver
Consolidate compiler generated dependencies of target __idf_esp_ringbuf
[ 25%] Built target afr_wifi
Consolidate compiler generated dependencies of target afr_pkcs11
[ 25%] Built target __idf_esp_ringbuf
[ 25%] Building C object CMakeFiles/afr_pkcs11.dir/libraries/abstractions/pkcs11/corePKCS11/source/core_pkcs11.c.obj
Consolidate compiler generated dependencies of target __idf_heap
[ 25%] Built target __idf_heap
Consolidate compiler generated dependencies of target __idf_log
[ 26%] Built target __idf_log
Consolidate compiler generated dependencies of target __idf_lwip
[ 26%] Linking C static library afr_pkcs11.a
[ 26%] Built target afr_pkcs11
Consolidate compiler generated dependencies of target afr_pkcs11_implementation
[ 26%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 26%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/vendors/espressif/boards/ports/pkcs11/core_pkcs11_pal.c.obj
[ 26%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 26%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 26%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/libraries/abstractions/pkcs11/corePKCS11/source/portable/mbedtls/core_pkcs11_mbedtls.c.obj
[ 31%] Built target __idf_lwip
Consolidate compiler generated dependencies of target __idf_esp_wifi
[ 31%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 32%] Built target __idf_esp_wifi
[ 32%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
Consolidate compiler generated dependencies of target __idf_nvs_flash
[ 32%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 32%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 32%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 35%] Built target __idf_nvs_flash
[ 35%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 35%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 35%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 35%] Building C object CMakeFiles/afr_pkcs11_implementation.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
Consolidate compiler generated dependencies of target __idf_wpa_supplicant
[ 40%] Built target __idf_wpa_supplicant
Consolidate compiler generated dependencies of target __idf_esp_event
[ 40%] Built target __idf_esp_event
Consolidate compiler generated dependencies of target __idf_esp_netif
[ 40%] Built target __idf_esp_netif
Consolidate compiler generated dependencies of target __idf_tcpip_adapter
[ 40%] Built target __idf_tcpip_adapter
Consolidate compiler generated dependencies of target __idf_esp_eth
[ 41%] Built target __idf_esp_eth
Consolidate compiler generated dependencies of target __idf_vfs
[ 41%] Built target __idf_vfs
Consolidate compiler generated dependencies of target soc_esp32
[ 42%] Built target soc_esp32
Consolidate compiler generated dependencies of target __idf_soc
[ 45%] Built target __idf_soc
Scanning dependencies of target __idf_esp_system
Consolidate compiler generated dependencies of target __idf_esp_system
[ 46%] Built target __idf_esp_system
Consolidate compiler generated dependencies of target __idf_spi_flash
[ 47%] Built target __idf_spi_flash
Consolidate compiler generated dependencies of target __idf_esp_ipc
[ 47%] Built target __idf_esp_ipc
Consolidate compiler generated dependencies of target __idf_app_update
[ 47%] Built target __idf_app_update
Consolidate compiler generated dependencies of target __idf_bootloader_support
[ 49%] Built target __idf_bootloader_support
Consolidate compiler generated dependencies of target __idf_efuse
[ 49%] Built target __idf_efuse
Scanning dependencies of target __idf_xtensa
Consolidate compiler generated dependencies of target __idf_xtensa
[ 49%] Linking C static library afr_pkcs11_implementation.a
[ 50%] Built target __idf_xtensa
Consolidate compiler generated dependencies of target __idf_protobuf-c
Consolidate compiler generated dependencies of target __idf_console
Consolidate compiler generated dependencies of target __idf_json
Consolidate compiler generated dependencies of target __idf_asio
[ 50%] Built target afr_pkcs11_implementation
Consolidate compiler generated dependencies of target __idf_bt
[ 50%] Built target __idf_asio
[ 50%] Built target __idf_json
[ 50%] Built target __idf_console
[ 50%] Built target __idf_protobuf-c
Consolidate compiler generated dependencies of target __idf_cbor
Consolidate compiler generated dependencies of target __idf_depthai-spi-api
Consolidate compiler generated dependencies of target __idf_esp_adc_cal
Consolidate compiler generated dependencies of target __idf_coap
[ 51%] Built target __idf_cbor
Consolidate compiler generated dependencies of target __idf_esp_gdbstub
[ 51%] Built target __idf_esp_adc_cal
[ 52%] Built target __idf_depthai-spi-api
[ 52%] Built target __idf_esp_gdbstub
Consolidate compiler generated dependencies of target __idf_esp_https_ota
[ 54%] Built target __idf_coap
Consolidate compiler generated dependencies of target __idf_sdmmc
Consolidate compiler generated dependencies of target __idf_esp_websocket_client
Consolidate compiler generated dependencies of target __idf_wear_levelling
Consolidate compiler generated dependencies of target __idf_expat
[ 61%] Built target __idf_wear_levelling
[ 60%] Built target __idf_esp_https_ota
[ 60%] Built target __idf_bt
Consolidate compiler generated dependencies of target __idf_freemodbus
[ 61%] Built target __idf_sdmmc
[ 61%] Built target __idf_expat
[ 62%] Built target __idf_esp_websocket_client
Consolidate compiler generated dependencies of target __idf_jsmn
[ 62%] Built target __idf_jsmn
Scanning dependencies of target __idf_libsodium
[ 64%] Built target __idf_freemodbus
Consolidate compiler generated dependencies of target __idf_openssl
Consolidate compiler generated dependencies of target __idf_mqtt
Consolidate compiler generated dependencies of target __idf_libsodium
Consolidate compiler generated dependencies of target afr_tls
Consolidate compiler generated dependencies of target __idf_spiffs
[ 64%] Building C object CMakeFiles/afr_tls.dir/libraries/freertos_plus/standard/tls/src/iot_tls.c.obj
Consolidate compiler generated dependencies of target __idf_protocomm
[ 65%] Built target __idf_openssl
[ 67%] Built target __idf_mqtt
[ 67%] Building C object CMakeFiles/afr_tls.dir/libraries/freertos_plus/standard/utils/src/iot_system_init.c.obj
[ 67%] Built target __idf_spiffs
[ 74%] Built target __idf_libsodium
[ 75%] Built target __idf_protocomm
[ 75%] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
Consolidate compiler generated dependencies of target __idf_mdns
Consolidate compiler generated dependencies of target __idf_esp_hid
Consolidate compiler generated dependencies of target __idf_esp_serial_slave_link
[ 75%] Built target __idf_mdns
[ 76%] Built target __idf_esp_hid
Consolidate compiler generated dependencies of target __idf_fatfs
[ 76%] Built target __idf_esp_serial_slave_link
Consolidate compiler generated dependencies of target __idf_wifi_provisioning
[ 76%] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 77%] Built target __idf_fatfs
[ 77%] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
Consolidate compiler generated dependencies of target __idf_esp_local_ctrl
[ 77%] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 78%] Built target __idf_wifi_provisioning
[ 79%] Built target __idf_esp_local_ctrl
[ 79%] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 79%] Built target __ldgen_output_esp32.project.ld
[ 79%] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 80%] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 80%] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 80%] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 80%] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 80%] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 80%] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 80%] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 80%] Linking C static library afr_tls.a
[ 80%] Built target afr_tls
Consolidate compiler generated dependencies of target afr_logging
[ 80%] Building C object CMakeFiles/afr_logging.dir/libraries/logging/iot_logging.c.obj
[ 80%] Building C object CMakeFiles/afr_logging.dir/libraries/logging/iot_logging_task_dynamic_buffers.c.obj
[ 80%] Linking C static library afr_logging.a
[ 80%] Built target afr_logging
Consolidate compiler generated dependencies of target afr_secure_sockets
[ 80%] Building C object CMakeFiles/afr_secure_sockets.dir/libraries/abstractions/secure_sockets/lwip/iot_secure_sockets.c.obj
[ 80%] Linking C static library afr_secure_sockets.a
[ 80%] Built target afr_secure_sockets
Consolidate compiler generated dependencies of target afr_platform
[ 81%] Building C object CMakeFiles/afr_platform.dir/libraries/abstractions/platform/freertos/iot_clock_freertos.c.obj
[ 81%] Building C object CMakeFiles/afr_platform.dir/libraries/abstractions/platform/freertos/iot_threads_freertos.c.obj
[ 81%] Building C object CMakeFiles/afr_platform.dir/libraries/abstractions/platform/freertos/iot_metrics.c.obj
[ 81%] Building C object CMakeFiles/afr_platform.dir/libraries/abstractions/platform/freertos/iot_network_freertos.c.obj
[ 81%] Linking C static library afr_platform.a
[ 81%] Built target afr_platform
Consolidate compiler generated dependencies of target afr_common
[ 81%] Building C object CMakeFiles/afr_common.dir/libraries/c_sdk/standard/common/iot_static_memory_common.c.obj
[ 81%] Building C object CMakeFiles/afr_common.dir/libraries/c_sdk/standard/common/iot_device_metrics.c.obj
[ 81%] Building C object CMakeFiles/afr_common.dir/libraries/c_sdk/standard/common/taskpool/iot_taskpool.c.obj
[ 81%] Building C object CMakeFiles/afr_common.dir/libraries/c_sdk/standard/common/iot_init.c.obj[ 81%] Linking C static library afr_common.a
[ 81%] Built target afr_common
Consolidate compiler generated dependencies of target afr_device_shadow
Consolidate compiler generated dependencies of target afr_pkcs11_helpers
Consolidate compiler generated dependencies of target afr_device_defender
Consolidate compiler generated dependencies of target afr_core_json
Consolidate compiler generated dependencies of target afr_transport_interface_secure_sockets
[ 81%] Building C object CMakeFiles/afr_device_shadow.dir/libraries/device_shadow_for_aws/source/shadow.c.obj
Consolidate compiler generated dependencies of target afr_core_http
[ 81%] Building C object CMakeFiles/afr_core_json.dir/libraries/coreJSON/source/core_json.c.obj
[ 81%] Building C object CMakeFiles/afr_pkcs11_helpers.dir/demos/common/pkcs11_helpers/pkcs11_helpers.c.obj
[ 81%] Building C object CMakeFiles/afr_transport_interface_secure_sockets.dir/libraries/abstractions/transport/secure_sockets/transport_secure_sockets.c.obj
[ 82%] Building C object CMakeFiles/afr_device_defender.dir/libraries/device_defender_for_aws/source/defender.c.obj
[ 82%] Building C object CMakeFiles/afr_core_http.dir/libraries/coreHTTP/source/core_http_client.c.obj
[ 83%] Linking C static library afr_pkcs11_helpers.a
[ 83%] Built target afr_pkcs11_helpers
Consolidate compiler generated dependencies of target afr_serializer
[ 84%] Linking C static library afr_device_shadow.a
[ 84%] Building C object CMakeFiles/afr_serializer.dir/libraries/c_sdk/standard/serializer/src/cbor/iot_serializer_tinycbor_decoder.c.obj
[ 84%] Linking C static library afr_device_defender.a
[ 84%] Built target afr_device_defender
[ 84%] Built target afr_device_shadow
[ 84%] Linking C static library afr_transport_interface_secure_sockets.a
Consolidate compiler generated dependencies of target afr_core_mqtt
Consolidate compiler generated dependencies of target afr_dev_mode_key_provisioning
[ 84%] Building C object CMakeFiles/afr_core_mqtt.dir/libraries/coreMQTT/source/core_mqtt.c.obj
[ 84%] Linking C static library afr_core_json.a
[ 84%] Built target afr_transport_interface_secure_sockets
[ 84%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/demos/dev_mode_key_provisioning/src/aws_dev_mode_key_provisioning.c.obj
[ 84%] Building C object CMakeFiles/afr_serializer.dir/libraries/c_sdk/standard/serializer/src/cbor/iot_serializer_tinycbor_encoder.c.obj
[ 84%] Built target afr_core_json
[ 84%] Building C object CMakeFiles/afr_serializer.dir/libraries/c_sdk/standard/serializer/src/json/iot_serializer_json_decoder.c.obj
[ 84%] Building C object CMakeFiles/afr_serializer.dir/libraries/c_sdk/standard/serializer/src/json/iot_serializer_json_encoder.c.obj
[ 84%] Building C object CMakeFiles/afr_serializer.dir/libraries/c_sdk/standard/serializer/src/iot_serializer_static_memory.c.obj
[ 84%] Building C object CMakeFiles/afr_core_mqtt.dir/libraries/coreMQTT/source/core_mqtt_state.c.obj
[ 84%] Building C object CMakeFiles/afr_core_http.dir/libraries/coreHTTP/source/dependency/3rdparty/http_parser/http_parser.c.obj
[ 84%] Building C object CMakeFiles/afr_serializer.dir/libraries/c_sdk/standard/serializer/src/iot_json_utils.c.obj
[ 84%] Building C object CMakeFiles/afr_serializer.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 84%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/libraries/freertos_plus/standard/utils/src/iot_system_init.c.obj
[ 84%] Building C object CMakeFiles/afr_core_mqtt.dir/libraries/coreMQTT/source/core_mqtt_serializer.c.obj
[ 84%] Building C object CMakeFiles/afr_serializer.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 84%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 84%] Building C object CMakeFiles/afr_serializer.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 84%] Building C object CMakeFiles/afr_serializer.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 84%] Building C object CMakeFiles/afr_serializer.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 85%] Building C object CMakeFiles/afr_serializer.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 85%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 85%] Building C object CMakeFiles/afr_serializer.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 85%] Building C object CMakeFiles/afr_serializer.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 85%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 85%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 85%] Building C object CMakeFiles/afr_serializer.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 85%] Linking C static library afr_core_mqtt.a
[ 85%] Building C object CMakeFiles/afr_serializer.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 85%] Built target afr_core_mqtt
Consolidate compiler generated dependencies of target afr_mqtt_demo_helpers
[ 85%] Building C object CMakeFiles/afr_mqtt_demo_helpers.dir/demos/common/mqtt_demo_helpers/mqtt_demo_helpers.c.obj
[ 85%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 85%] Building C object CMakeFiles/afr_serializer.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 85%] Building C object CMakeFiles/afr_serializer.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 85%] Building C object CMakeFiles/afr_serializer.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 85%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 85%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 85%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 85%] Linking C static library afr_mqtt_demo_helpers.a
[ 85%] Linking C static library afr_serializer.a
[ 85%] Built target afr_mqtt_demo_helpers
[ 85%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 85%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 85%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 85%] Built target afr_serializer
Consolidate compiler generated dependencies of target afr_ble_hal
[ 85%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 85%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/boards/ports/ble/iot_ble_hal_common_gap.c.obj
[ 85%] Linking C static library afr_core_http.a
[ 85%] Building C object CMakeFiles/afr_dev_mode_key_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 85%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/boards/ports/ble/iot_ble_hal_gap.c.obj
[ 85%] Built target afr_core_http
[ 85%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/boards/ports/ble/iot_ble_hal_gatt_server.c.obj
Consolidate compiler generated dependencies of target afr_http_demo_helpers
[ 85%] Building C object CMakeFiles/afr_http_demo_helpers.dir/demos/common/http_demo_helpers/http_demo_utils.c.obj
[ 85%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 85%] Linking C static library afr_dev_mode_key_provisioning.a
[ 85%] Built target afr_dev_mode_key_provisioning
[ 85%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 85%] Linking C static library afr_http_demo_helpers.a
[ 85%] Built target afr_http_demo_helpers
[ 85%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 85%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 85%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 85%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 86%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 86%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 86%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 86%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 86%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 86%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
Consolidate compiler generated dependencies of target afr_core_http_demo_dependencies
[ 86%] Building C object CMakeFiles/afr_core_http_demo_dependencies.dir/libraries/coreHTTP/source/dependency/3rdparty/http_parser/http_parser.c.obj
[ 87%] Building C object CMakeFiles/afr_core_http_demo_dependencies.dir/libraries/coreHTTP/source/core_http_client.c.obj
[ 87%] Building C object CMakeFiles/afr_ble_hal.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 87%] Linking CXX static library afr_ble_hal.a
[ 87%] Built target afr_ble_hal
Consolidate compiler generated dependencies of target afr_ble
[ 87%] Building C object CMakeFiles/afr_ble.dir/libraries/c_sdk/standard/ble/src/iot_ble_gap.c.obj
[ 87%] Building C object CMakeFiles/afr_ble.dir/libraries/c_sdk/standard/ble/src/iot_ble_gatt.c.obj
[ 87%] Building C object CMakeFiles/afr_ble.dir/libraries/c_sdk/standard/ble/src/services/device_information/iot_ble_device_information.c.obj
[ 87%] Building C object CMakeFiles/afr_ble.dir/libraries/c_sdk/standard/ble/src/services/data_transfer/iot_ble_data_transfer.c.obj
[ 87%] Building C object CMakeFiles/afr_ble.dir/libraries/c_sdk/standard/ble/src/services/mqtt_ble/iot_network_ble.c.obj
[ 87%] Building C object CMakeFiles/afr_ble.dir/libraries/c_sdk/standard/ble/src/services/mqtt_ble/iot_ble_mqtt_serialize.c.obj
[ 87%] Building C object CMakeFiles/afr_ble.dir/libraries/c_sdk/standard/ble/src/services/mqtt_ble/iot_ble_mqtt_transport.c.obj
[ 87%] Building C object CMakeFiles/afr_ble.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 87%] Building C object CMakeFiles/afr_ble.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
In file included from /home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/config_files/iot_config.h:63,
                 from /home/mohit/Documents/amazon-freertos/libraries/c_sdk/standard/common/include/iot_linear_containers.h:35,
                 from /home/mohit/Documents/amazon-freertos/libraries/c_sdk/standard/ble/include/iot_ble.h:40,
                 from /home/mohit/Documents/amazon-freertos/libraries/c_sdk/standard/ble/src/services/mqtt_ble/iot_ble_mqtt_transport.c:26:
/home/mohit/Documents/amazon-freertos/demos/include/iot_config_common.h:82: warning: "IotBle_Assert" redefined
 #define IotBle_Assert( expression )            configASSERT( expression )
 
In file included from /home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/config_files/iot_ble_config.h:45,
                 from /home/mohit/Documents/amazon-freertos/libraries/c_sdk/standard/ble/include/iot_ble.h:39,
                 from /home/mohit/Documents/amazon-freertos/libraries/c_sdk/standard/ble/src/services/mqtt_ble/iot_ble_mqtt_transport.c:26:
/home/mohit/Documents/amazon-freertos/libraries/c_sdk/standard/ble/include/iot_ble_config_defaults.h:395: note: this is the location of the previous definition
     #define IotBle_Assert( expression )    assert( expression )
 
[ 87%] Building C object CMakeFiles/afr_ble.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 88%] Building C object CMakeFiles/afr_ble.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 88%] Building C object CMakeFiles/afr_ble.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 88%] Building C object CMakeFiles/afr_ble.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 88%] Building C object CMakeFiles/afr_ble.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 88%] Building C object CMakeFiles/afr_ble.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 88%] Building C object CMakeFiles/afr_ble.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 88%] Building C object CMakeFiles/afr_ble.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 88%] Building C object CMakeFiles/afr_ble.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 88%] Linking C static library afr_core_http_demo_dependencies.a
[ 88%] Building C object CMakeFiles/afr_ble.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 88%] Building C object CMakeFiles/afr_ble.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 88%] Built target afr_core_http_demo_dependencies
Consolidate compiler generated dependencies of target afr_https
[ 88%] Building C object CMakeFiles/afr_https.dir/libraries/c_sdk/standard/https/src/iot_https_client.c.obj
[ 88%] Building C object CMakeFiles/afr_https.dir/libraries/c_sdk/standard/https/src/iot_https_utils.c.obj
[ 88%] Linking CXX static library afr_ble.a
[ 88%] Built target afr_ble
Consolidate compiler generated dependencies of target afr_core_mqtt_demo_dependencies
Consolidate compiler generated dependencies of target afr_ble_wifi_provisioning
[ 88%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/libraries/coreMQTT/source/core_mqtt.c.obj
[ 88%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/libraries/coreMQTT/source/core_mqtt_state.c.obj
[ 88%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 88%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 88%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/libraries/c_sdk/standard/ble/src/services/wifi_provisioning/iot_ble_wifi_provisioning.c.obj
[ 88%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 88%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 88%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 88%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 88%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 88%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 88%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 88%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 88%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 88%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 88%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 88%] Linking C static library afr_https.a
[ 89%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 89%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 89%] Built target afr_https
[ 89%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 89%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 89%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 89%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 89%] Building C object CMakeFiles/afr_core_mqtt_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 89%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 89%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 90%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 90%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 90%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 90%] Linking CXX static library afr_core_mqtt_demo_dependencies.a
[ 90%] Building C object CMakeFiles/afr_ble_wifi_provisioning.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 90%] Built target afr_core_mqtt_demo_dependencies
Consolidate compiler generated dependencies of target afr_jobs_demo_dependencies
Consolidate compiler generated dependencies of target afr_mqtt
Consolidate compiler generated dependencies of target afr_device_defender_demo_dependencies
[ 90%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/libraries/jobs_for_aws/source/jobs.c.obj
[ 90%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 90%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 90%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/libraries/device_defender_for_aws/source/defender.c.obj
[ 91%] Building C object CMakeFiles/afr_mqtt.dir/libraries/c_sdk/standard/mqtt/src/iot_mqtt_api.c.obj
[ 91%] Linking CXX static library afr_ble_wifi_provisioning.a
[ 91%] Built target afr_ble_wifi_provisioning
[ 91%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 91%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
Consolidate compiler generated dependencies of target afr_device_shadow_demo_dependencies
In file included from /home/mohit/Documents/amazon-freertos/libraries/c_sdk/standard/common/include/iot_atomic.h:37,
                 from /home/mohit/Documents/amazon-freertos/libraries/c_sdk/standard/mqtt/src/iot_mqtt_api.c:48:
/home/mohit/Documents/amazon-freertos/freertos_kernel/include/atomic.h:396:34: warning: 'Atomic_XOR_u32' defined but not used [-Wunused-function]
 static portFORCE_INLINE uint32_t Atomic_XOR_u32( uint32_t volatile * pulDestination,
                                  ^~~~~~~~~~~~~~
/home/mohit/Documents/amazon-freertos/freertos_kernel/include/atomic.h:369:34: warning: 'Atomic_NAND_u32' defined but not used [-Wunused-function]
 static portFORCE_INLINE uint32_t Atomic_NAND_u32( uint32_t volatile * pulDestination,
                                  ^~~~~~~~~~~~~~~
/home/mohit/Documents/amazon-freertos/freertos_kernel/include/atomic.h:342:34: warning: 'Atomic_AND_u32' defined but not used [-Wunused-function]
 static portFORCE_INLINE uint32_t Atomic_AND_u32( uint32_t volatile * pulDestination,
                                  ^~~~~~~~~~~~~~
/home/mohit/Documents/amazon-freertos/freertos_kernel/include/atomic.h:315:34: warning: 'Atomic_OR_u32' defined but not used [-Wunused-function]
 static portFORCE_INLINE uint32_t Atomic_OR_u32( uint32_t volatile * pulDestination,
                                  ^~~~~~~~~~~~~
/home/mohit/Documents/amazon-freertos/freertos_kernel/include/atomic.h:288:34: warning: 'Atomic_Decrement_u32' defined but not used [-Wunused-function]
 static portFORCE_INLINE uint32_t Atomic_Decrement_u32( uint32_t volatile * pulAddend )
                                  ^~~~~~~~~~~~~~~~~~~~
/home/mohit/Documents/amazon-freertos/freertos_kernel/include/atomic.h:263:34: warning: 'Atomic_Increment_u32' defined but not used [-Wunused-function]
 static portFORCE_INLINE uint32_t Atomic_Increment_u32( uint32_t volatile * pulAddend )
                                  ^~~~~~~~~~~~~~~~~~~~
/home/mohit/Documents/amazon-freertos/freertos_kernel/include/atomic.h:237:34: warning: 'Atomic_Subtract_u32' defined but not used [-Wunused-function]
 static portFORCE_INLINE uint32_t Atomic_Subtract_u32( uint32_t volatile * pulAddend,
                                  ^~~~~~~~~~~~~~~~~~~
/home/mohit/Documents/amazon-freertos/freertos_kernel/include/atomic.h:209:34: warning: 'Atomic_Add_u32' defined but not used [-Wunused-function]
 static portFORCE_INLINE uint32_t Atomic_Add_u32( uint32_t volatile * pulAddend,
                                  ^~~~~~~~~~~~~~
/home/mohit/Documents/amazon-freertos/freertos_kernel/include/atomic.h:176:34: warning: 'Atomic_CompareAndSwapPointers_p32' defined but not used [-Wunused-function]
 static portFORCE_INLINE uint32_t Atomic_CompareAndSwapPointers_p32( void * volatile * ppvDestination,
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mohit/Documents/amazon-freertos/freertos_kernel/include/atomic.h:144:32: warning: 'Atomic_SwapPointers_p32' defined but not used [-Wunused-function]
 static portFORCE_INLINE void * Atomic_SwapPointers_p32( void * volatile * ppvDestination,
                                ^~~~~~~~~~~~~~~~~~~~~~~
/home/mohit/Documents/amazon-freertos/freertos_kernel/include/atomic.h:108:34: warning: 'Atomic_CompareAndSwap_u32' defined but not used [-Wunused-function]
 static portFORCE_INLINE uint32_t Atomic_CompareAndSwap_u32( uint32_t volatile * pulDestination,
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
[ 91%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/libraries/device_shadow_for_aws/source/shadow.c.obj
[ 91%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 91%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 91%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 92%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 92%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 92%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 92%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 92%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 92%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 92%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 92%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/libraries/c_sdk/standard/mqtt/src/iot_mqtt_network.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/libraries/c_sdk/standard/mqtt/src/iot_mqtt_operation.c.obj
[ 92%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 92%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 92%] Building C object CMakeFiles/afr_jobs_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 92%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/libraries/c_sdk/standard/mqtt/src/iot_mqtt_publish_duplicates.c.obj
[ 92%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 92%] Linking CXX static library afr_jobs_demo_dependencies.a
[ 92%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 92%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 92%] Built target afr_jobs_demo_dependencies
[ 92%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/libraries/c_sdk/standard/mqtt/src/iot_mqtt_static_memory.c.obj
[ 92%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 92%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 92%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 92%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 92%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 92%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 92%] Building C object CMakeFiles/afr_device_defender_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/libraries/c_sdk/standard/mqtt/src/iot_mqtt_subscription.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/libraries/c_sdk/standard/mqtt/src/iot_mqtt_validate.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/libraries/c_sdk/standard/mqtt/src/iot_mqtt_context_connection.c.obj
[ 92%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 92%] Linking CXX static library afr_device_defender_demo_dependencies.a
[ 92%] Built target afr_device_defender_demo_dependencies
[ 92%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/libraries/c_sdk/standard/mqtt/src/iot_mqtt_serializer_deserializer_wrapper.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/libraries/c_sdk/standard/mqtt/src/iot_mqtt_managed_function_wrapper.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/libraries/c_sdk/standard/mqtt/src/iot_mqtt_subscription_container.c.obj
[ 92%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/libraries/c_sdk/standard/mqtt/src/iot_mqtt_mutex_wrapper.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/libraries/c_sdk/standard/mqtt/src/iot_mqtt_agent.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 92%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 92%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 92%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 92%] Building C object CMakeFiles/afr_mqtt.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 92%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 93%] Building C object CMakeFiles/afr_mqtt.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 93%] Building C object CMakeFiles/afr_mqtt.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 93%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 93%] Building C object CMakeFiles/afr_device_shadow_demo_dependencies.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 93%] Building C object CMakeFiles/afr_mqtt.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 93%] Building C object CMakeFiles/afr_mqtt.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 93%] Building C object CMakeFiles/afr_mqtt.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 93%] Building C object CMakeFiles/afr_mqtt.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 93%] Linking CXX static library afr_device_shadow_demo_dependencies.a
[ 93%] Building C object CMakeFiles/afr_mqtt.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 93%] Built target afr_device_shadow_demo_dependencies
[ 93%] Linking CXX static library afr_mqtt.a
[ 93%] Built target afr_mqtt
Consolidate compiler generated dependencies of target afr_ota
Consolidate compiler generated dependencies of target afr_shadow
Consolidate compiler generated dependencies of target afr_greengrass
[ 93%] Building C object CMakeFiles/afr_shadow.dir/libraries/c_sdk/aws/shadow/src/aws_iot_shadow_api.c.obj
[ 93%] Building C object CMakeFiles/afr_shadow.dir/libraries/c_sdk/aws/shadow/src/aws_iot_shadow_operation.c.obj
Consolidate compiler generated dependencies of target afr_defender
[ 93%] Building C object CMakeFiles/afr_shadow.dir/libraries/c_sdk/aws/shadow/src/aws_iot_shadow_parser.c.obj
[ 93%] Building C object CMakeFiles/afr_defender.dir/libraries/c_sdk/aws/defender/src/aws_iot_defender_api.c.obj
[ 93%] Building C object CMakeFiles/afr_greengrass.dir/libraries/freertos_plus/aws/greengrass/src/aws_greengrass_discovery.c.obj
[ 93%] Building C object CMakeFiles/afr_ota.dir/libraries/freertos_plus/aws/ota/src/aws_iot_ota_agent.c.obj
[ 93%] Building C object CMakeFiles/afr_greengrass.dir/libraries/freertos_plus/aws/greengrass/src/aws_helper_secure_connect.c.obj
[ 93%] Building C object CMakeFiles/afr_defender.dir/libraries/c_sdk/aws/defender/src/aws_iot_defender_collector.c.obj
[ 93%] Building C object CMakeFiles/afr_greengrass.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 93%] Building C object CMakeFiles/afr_defender.dir/libraries/c_sdk/aws/defender/src/aws_iot_defender_mqtt.c.obj
[ 93%] Building C object CMakeFiles/afr_shadow.dir/libraries/c_sdk/aws/shadow/src/aws_iot_shadow_static_memory.c.obj
[ 93%] Building C object CMakeFiles/afr_shadow.dir/libraries/c_sdk/aws/shadow/src/aws_iot_shadow_subscription.c.obj
[ 93%] Building C object CMakeFiles/afr_greengrass.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 93%] Building C object CMakeFiles/afr_defender.dir/libraries/c_sdk/aws/defender/src/aws_iot_defender_v1.c.obj
[ 93%] Building C object CMakeFiles/afr_shadow.dir/libraries/c_sdk/aws/shadow/src/aws_shadow.c.obj
[ 93%] Building C object CMakeFiles/afr_greengrass.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 93%] Building C object CMakeFiles/afr_greengrass.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 93%] Building C object CMakeFiles/afr_ota.dir/libraries/freertos_plus/aws/ota/src/aws_iot_ota_interface.c.obj
[ 93%] Building C object CMakeFiles/afr_greengrass.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 93%] Building C object CMakeFiles/afr_shadow.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 93%] Building C object CMakeFiles/afr_shadow.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 93%] Building C object CMakeFiles/afr_defender.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 93%] Building C object CMakeFiles/afr_ota.dir/libraries/3rdparty/mbedtls/library/base64.c.obj
[ 93%] Building C object CMakeFiles/afr_greengrass.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 93%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/boards/ports/ota/aws_ota_pal.c.obj
[ 93%] Building C object CMakeFiles/afr_shadow.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 94%] Building C object CMakeFiles/afr_shadow.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 94%] Building C object CMakeFiles/afr_defender.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 94%] Building C object CMakeFiles/afr_shadow.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 94%] Building C object CMakeFiles/afr_shadow.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 94%] Building C object CMakeFiles/afr_defender.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 94%] Building C object CMakeFiles/afr_greengrass.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 94%] Building C object CMakeFiles/afr_defender.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 94%] Building C object CMakeFiles/afr_greengrass.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 94%] Building C object CMakeFiles/afr_greengrass.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 94%] Building C object CMakeFiles/afr_shadow.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 94%] Building C object CMakeFiles/afr_shadow.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 94%] Building C object CMakeFiles/afr_greengrass.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 94%] Building C object CMakeFiles/afr_defender.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 94%] Building C object CMakeFiles/afr_shadow.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 94%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/boards/ports/ota/aws_esp_ota_ops.c.obj
[ 94%] Building C object CMakeFiles/afr_ota.dir/libraries/freertos_plus/aws/ota/src/mqtt/aws_iot_ota_cbor.c.obj
[ 94%] Building C object CMakeFiles/afr_greengrass.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 94%] Building C object CMakeFiles/afr_shadow.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 94%] Building C object CMakeFiles/afr_defender.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 95%] Building C object CMakeFiles/afr_greengrass.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 95%] Building C object CMakeFiles/afr_defender.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 95%] Building C object CMakeFiles/afr_greengrass.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 95%] Building C object CMakeFiles/afr_greengrass.dir/libraries/3rdparty/jsmn/jsmn.c.obj
[ 95%] Building C object CMakeFiles/afr_shadow.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 95%] Building C object CMakeFiles/afr_defender.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 95%] Building C object CMakeFiles/afr_defender.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 95%] Linking CXX static library afr_greengrass.a
[ 95%] Built target afr_greengrass
[ 95%] Building C object CMakeFiles/afr_shadow.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 95%] Building C object CMakeFiles/afr_shadow.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 95%] Building C object CMakeFiles/afr_defender.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 95%] Building C object CMakeFiles/afr_ota.dir/libraries/freertos_plus/aws/ota/src/mqtt/aws_iot_ota_mqtt.c.obj
[ 95%] Building C object CMakeFiles/afr_defender.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 95%] Linking CXX static library afr_shadow.a
[ 96%] Building C object CMakeFiles/afr_defender.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 96%] Built target afr_shadow
[ 96%] Building C object CMakeFiles/afr_defender.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 96%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 97%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 97%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 97%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
[ 97%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_aes_xts.c.obj
[ 97%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_sha.c.obj
[ 97%] Linking CXX static library afr_defender.a
[ 97%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_timing.c.obj
[ 97%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/aes.c.obj
[ 97%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/bignum.c.obj
[ 97%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/sha.c.obj
[ 97%] Built target afr_defender
[ 97%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha1.c.obj
[ 97%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha512.c.obj
[ 97%] Building C object CMakeFiles/afr_ota.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp32/esp_sha256.c.obj
[ 97%] Building C object CMakeFiles/afr_ota.dir/libraries/freertos_plus/aws/ota/src/http/aws_iot_ota_http.c.obj
[ 97%] Building C object CMakeFiles/afr_ota.dir/libraries/3rdparty/jsmn/jsmn.c.obj
[ 97%] Linking CXX static library afr_ota.a
[ 97%] Built target afr_ota
Consolidate compiler generated dependencies of target aws_demos
[ 97%] Building C object CMakeFiles/aws_demos.dir/libraries/freertos_plus/standard/utils/src/iot_system_init.c.obj
[ 97%] Building C object CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/main.c.obj
[ 97%] Building C object CMakeFiles/aws_demos.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj
[ 97%] Building C object CMakeFiles/aws_demos.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_hardware.c.obj
[ 97%] Building C object CMakeFiles/aws_demos.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_mem.c.obj
[ 97%] Building C object CMakeFiles/aws_demos.dir/vendors/espressif/esp-idf/components/mbedtls/port/mbedtls_debug.c.obj
In file included from /home/mohit/Documents/amazon-freertos/libraries/3rdparty/depthai-spi-api/common/esp32_spi_impl.h:21,
                 from /home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/main.c:49:
/home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/esp_event/include/esp_event_loop.h:2:2: warning: #warning "esp_event_loop.h is deprecated, please include esp_event.h instead" [-Wcpp]
 #warning "esp_event_loop.h is deprecated, please include esp_event.h instead"
  ^~~~~~~
In file included from /home/mohit/Documents/amazon-freertos/libraries/3rdparty/depthai-spi-api/spi_api.hpp:7,
                 from /home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/main.c:51:
/home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/depthai-spi-api/depthai-shared/include/depthai-shared/datatype/DatatypeEnum.hpp:3:10: fatal error: cstdint: No such file or directory
 #include <cstdint>
          ^~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/aws_demos.dir/build.make:76: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/main.c.obj] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:3227: CMakeFiles/aws_demos.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
make failed with exit code 2

Thank you in advance.

I am not sure what system you are using, but is a standard C++ header file, so for most systems, the file using it, or including the header that is in would have an extension indicating it is a C++ file (normally on of .cpp, .c++, or .cc depending on the system). The header is basically the equivalent of the standard C header <stdint.h> with just a difference of what ‘namespace’ it puts some of the definitions into (which is a C++ distinction).

If the library was written for C++, it is unlikely to work well from plain C, but you can write a very ‘C’ like program in C++ as it is mostly upwards compatible. My first guess is that even if you fix the reference to cstdint, there will be other constructs in the header that isn’t plain C and will give you more problems. Maybe start by giving your file a .cpp extension and see if you can make that work.

1 Like

Thank you for replying @richard-damon

Yes I did change my extension to .cpp and added required functions under extern “C” {}
Now it doesn’t give cstdint error but still not able to make due to other errors

I am getting the following error while making the project.

Documents/amazon-freertos/build$ make -j 16 all
[ 97%] Built target esp32_linker_script
[ 97%] Built target partition_table_bin
[ 97%] Built target blank_ota_data
[ 97%] Built target afr_3rdparty_tinycbor
[ 97%] Built target afr_kernel
[ 97%] Performing build step for 'bootloader'
[ 97%] Built target afr_freertos_plus_cli
[ 97%] Built target afr_backoff_algorithm
[ 97%] Built target afr_common_io
[ 97%] Built target afr_pkcs11_utils
[ 97%] Built target afr_jobs
[ 97%] Built target afr_3rdparty_mbedtls
[  1%] Built target _project_elf_src
[  5%] Built target __idf_log
[ 20%] Built target soc_esp32
[ 97%] Built target __idf_ulp
[ 97%] Built target afr_wifi
[ 97%] Built target afr_freertos_cli_plus_uart
[ 97%] Built target afr_crypto
[ 65%] Built target __idf_soc
[ 97%] Built target __idf_esp_http_server
[ 67%] Built target __idf_micro-ecc
[ 97%] Built target afr_pkcs11
[ 97%] Built target __idf_esp_http_client
[ 97%] Built target afr_pkcs11_implementation
[ 84%] Built target __idf_bootloader_support
[ 97%] Built target afr_tls
[ 97%] Built target __idf_tcp_transport
[ 92%] Built target __idf_efuse
[ 97%] Built target afr_logging
[ 97%] Built target afr_secure_sockets
[ 94%] Built target __idf_spi_flash
[ 97%] Built target __idf_esp-tls
[ 97%] Built target afr_platform
[ 96%] Built target __idf_main
[ 99%] Built target bootloader.elf
[ 97%] Built target __idf_nghttp
[100%] Built target gen_project_binary
[ 97%] Built target afr_common
[ 97%] Built target __idf_app_trace
[100%] Built target app
[ 97%] No install step for 'bootloader'
[ 97%] Built target afr_device_shadow
[ 97%] Built target afr_device_defender
[ 97%] Built target afr_core_json
[ 97%] Completed 'bootloader'
[ 97%] Built target __idf_cxx
[ 97%] Built target afr_pkcs11_helpers
[ 97%] Built target bootloader
[ 97%] Built target afr_core_http
[ 97%] Built target afr_transport_interface_secure_sockets
[ 97%] Built target afr_serializer
[ 97%] Built target afr_core_mqtt
[ 97%] Built target afr_dev_mode_key_provisioning
[ 97%] Built target __idf_newlib
[ 97%] Built target afr_http_demo_helpers
[ 97%] Built target afr_mqtt_demo_helpers
[ 97%] Built target afr_core_http_demo_dependencies
[ 97%] Built target __idf_freertos
[ 97%] Built target afr_https
[ 97%] Built target __idf_esp_timer
[ 97%] Built target __idf_esp_common
[ 97%] Built target __idf_esp32
[ 97%] Built target __idf_perfmon
[ 97%] Built target __idf_espcoredump
[ 97%] Built target __idf_pthread
[ 97%] Built target __idf_driver
[ 97%] Built target __idf_esp_ringbuf
[ 97%] Built target __idf_heap
[ 97%] Built target __idf_log
[ 97%] Built target __idf_lwip
[ 97%] Built target __idf_esp_wifi
[ 97%] Built target __idf_nvs_flash
[ 97%] Built target __idf_wpa_supplicant
[ 97%] Built target __idf_esp_event
[ 97%] Built target __idf_esp_netif
[ 97%] Built target __idf_tcpip_adapter
[ 97%] Built target __idf_esp_eth
[ 97%] Built target __idf_vfs
[ 97%] Built target soc_esp32
[ 97%] Built target __idf_soc
[ 97%] Built target __idf_esp_system
[ 97%] Built target __idf_spi_flash
[ 97%] Built target __idf_esp_ipc
[ 97%] Built target __idf_app_update
[ 97%] Built target __idf_bootloader_support
[ 97%] Built target __idf_efuse
[ 97%] Built target __idf_xtensa
[ 97%] Built target __idf_console
[ 97%] Built target __idf_cbor
[ 97%] Built target __idf_protobuf-c
[ 97%] Built target __idf_json
[ 97%] Built target __idf_asio
[ 97%] Built target __idf_coap
[ 97%] Built target __idf_bt
[ 97%] Built target __idf_esp_gdbstub
[ 97%] Built target __idf_depthai-spi-api
[ 97%] Built target __idf_esp_https_ota
[ 97%] Built target __idf_esp_adc_cal
[ 97%] Built target __idf_sdmmc
[ 97%] Built target __idf_esp_websocket_client
[ 97%] Built target __idf_expat
[ 97%] Built target __idf_wear_levelling
[ 97%] Built target __idf_jsmn
[ 97%] Built target __idf_mqtt
[ 97%] Built target __idf_openssl
[ 97%] Built target __idf_freemodbus
[ 97%] Built target __idf_spiffs
[ 97%] Built target __idf_libsodium
[ 97%] Built target afr_ble_hal
[ 97%] Built target __idf_protocomm
[ 97%] Built target __idf_mdns
[ 97%] Built target __idf_esp_serial_slave_link
[ 97%] Built target __idf_esp_hid
[ 97%] Built target __idf_fatfs
[ 97%] Built target __idf_wifi_provisioning
[ 97%] Built target afr_ble
[ 97%] Built target __idf_esp_local_ctrl
[ 97%] Built target afr_core_mqtt_demo_dependencies
[ 97%] Built target __ldgen_output_esp32.project.ld
[ 97%] Built target afr_ble_wifi_provisioning
[ 97%] Built target afr_mqtt
[ 97%] Built target afr_jobs_demo_dependencies
[ 97%] Built target afr_device_defender_demo_dependencies
[ 97%] Built target afr_device_shadow_demo_dependencies
[ 97%] Built target afr_greengrass
[ 97%] Built target afr_shadow
[ 97%] Built target afr_defender
[ 97%] Built target afr_ota
Consolidate compiler generated dependencies of target aws_demos
[ 97%] Building CXX object CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/main.cpp.obj
cc1plus: warning: command line option '-Wno-implicit-function-declaration' is valid for C/ObjC but not for C++
cc1plus: warning: command line option '-Wno-pointer-sign' is valid for C/ObjC but not for C++
cc1plus: warning: command line option '-Wno-incompatible-pointer-types' is valid for C/ObjC but not for C++
In file included from /home/mohit/Documents/amazon-freertos/libraries/3rdparty/depthai-spi-api/common/esp32_spi_impl.h:21,
                 from /home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/main.cpp:49:
/home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/esp_event/include/esp_event_loop.h:2:2: warning: #warning "esp_event_loop.h is deprecated, please include esp_event.h instead" [-Wcpp]
 #warning "esp_event_loop.h is deprecated, please include esp_event.h instead"
  ^~~~~~~
/home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/main.cpp: In function 'void prvMiscInitialization()':
/home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/main.cpp:228:13: warning: unused variable 'uartRet' [-Wunused-variable]
     int32_t uartRet;
             ^~~~~~~
/home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/main.cpp: In function 'int32_t xPortGetUserInput(uint8_t*, uint32_t, TickType_t)':
/home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/main.cpp:344:20: warning: unused variable 'xReturnMessage' [-Wunused-variable]
         BaseType_t xReturnMessage = pdFALSE;
                    ^~~~~~~~~~~~~~
/home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/main.cpp: At global scope:
/home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/main.cpp:56:20: warning: 'PREVIEWSTREAM' defined but not used [-Wunused-variable]
 static const char* PREVIEWSTREAM = "spipreview";
                    ^~~~~~~~~~~~~
In file included from /home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/main.cpp:50:
/home/mohit/Documents/amazon-freertos/libraries/3rdparty/depthai-spi-api/spi_api.hpp:14:20: warning: 'dai::NOSTREAM' defined but not used [-Wunused-variable]
 static const char* NOSTREAM = "";
                    ^~~~~~~~
[ 97%] Linking CXX executable aws_demos
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/esp32/libesp32.a(cpu_start.c.obj):(.literal.main_task+0x10): undefined reference to `app_main'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/esp32/libesp32.a(cpu_start.c.obj): in function `main_task':
/home/mohit/Documents/amazon-freertos/vendors/espressif/esp-idf/components/esp32/cpu_start.c:599: undefined reference to `app_main'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/aws_demos.dir/build.make:1041: aws_demos] Error 1
make[1]: *** [CMakeFiles/Makefile2:3227: CMakeFiles/aws_demos.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

As I said, I am not familiar with the set of code you are using, but the error message says you haven’t defined the function app_main, which by its name I presume is supposed to be the entry point to your user provided code (it likely has its own main() function to setup its own stuff). You will need to read the documentation to see what you are supposed to put in there.

Seems like you are trying to add some C++ files (eg DatatypeEnum.hpp) in main.c. .c extension files are compiled using C compiler and as a result, C++ headers are not found.

I’d suggest that you move the C++ changes to a separate file. Let’s say you create 2 files depthai_spi_app.hpp and depthai_spi_app.cpp - move all your changes from main.c to depthai_spi_app.cpp. Now you can export one or more extern C functions from depthai_spi_app.cpp which can be called from main.c.

As an example:
depthai_spi_app.hpp:

#ifndef DEPTHAI_SPI_APP_HPP
#define DEPTHAI_SPI_APP_HPP

/* Note that this file only contains the declarations of the functions to be
 * invoked from main.c. There is no other include or declaration. */
 
extern "C" {
    void start_my_application( void );
}

#endif /* DEPTHAI_SPI_APP_HPP */

depthai_spi_app.cpp:

#include "depthai_spi_app.hpp"

void start_my_application( void )
{
    /* All depthai-spi related changes which are currently in  main.c. */
}

main.c:

#include "depthai_spi_app.hpp"

int app_main( void )
{
    ...
    start_my_application();
}

Thanks.

Hello @aggarg, Thank you for your reply.

I tried this also and it gave the following errors

After few trials I removed extern “C” in depthaicode.hpp file since it was throwing error: expected identifier or '(' before string constant extern "C"{ and after removing it I got following error.

home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp:21:9: error: conflicting declaration of 'void start_my_application()' with 'C' linkage
    void start_my_application();
         ^~~~~~~~~~~~~~~~~~~~
In file included from /home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp:1:
/home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.hpp:5:7: note: previous declaration with 'C++' linkage
  void start_my_application();

depthaicode.hpp

#ifndef DEPTHAICODE_HPP
#define DEPTHAICODE_HPP

void start_my_application();

#endif 

depthaicode.cpp

#include "depthaicode.hpp"

extern "C" {
void start_my_application();
}
void start_my_application( void )
{
    /*Application code*/
}

main.c : As suggested by you

Removing extern "C" wont solve the problem. You probably would have got the above error when compiling main.c which is compiled using C compiler (and C compiler may have problem recognizing extern "C"). Please update the depthai_spi_app.hpp to the following:

#ifndef DEPTHAI_SPI_APP_HPP
#define DEPTHAI_SPI_APP_HPP

/* Note that this file only contains the declarations of the functions to be
* invoked from main.c. There is no other include or declaration. */
#ifdef __cplusplus
extern "C" {
#endif

    void start_my_application( void );

#ifdef __cplusplus
}
#endif

#endif /* DEPTHAI_SPI_APP_HPP */

Thanks.

Hey @aggarg , Thanks for the reply and sorry for late response…

I tried this solution as well and ended up with the same old error.

/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/main.c.obj:(.literal.app_main+0xc): undefined reference to `start_my_application'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/main.c.obj: in function `app_main':
/home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/main.c:141: undefined reference to `start_my_application'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/aws_demos.dir/build.make:1041: aws_demos] Error 1
make[1]: *** [CMakeFiles/Makefile2:3227: CMakeFiles/aws_demos.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
make failed with exit code 2

So I had not added depthaicode.cpp in Cmakelists and after adding it now I get this error (Your depthai_spi_app.cpp is my depthaicode.cpp )

/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp.obj:(.literal._Z8run_demov+0x0): undefined reference to `esp32_send_spi'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp.obj:(.literal._Z8run_demov+0x4): undefined reference to `esp32_recv_spi'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp.obj:(.literal._Z8run_demov+0x10): undefined reference to `dai::SpiApi::SpiApi()'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp.obj:(.literal._Z8run_demov+0x14): undefined reference to `dai::SpiApi::set_send_spi_impl(unsigned char (*)(char const*))'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp.obj:(.literal._Z8run_demov+0x18): undefined reference to `dai::SpiApi::set_recv_spi_impl(unsigned char (*)(char*))'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp.obj:(.literal._Z8run_demov+0x1c): undefined reference to `dai::SpiApi::req_message(dai::Message*, char const*)'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp.obj:(.literal._Z8run_demov+0x20): undefined reference to `void dai::SpiApi::parse_metadata<dai::RawImgDetections>(dai::Metadata*, dai::RawImgDetections&)'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp.obj:(.literal._Z8run_demov+0x2c): undefined reference to `dai::SpiApi::free_message(dai::Message*)'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp.obj:(.literal._Z8run_demov+0x30): undefined reference to `dai::SpiApi::spi_pop_messages()'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp.obj:(.literal.start_my_application+0x0): undefined reference to `init_esp32_spi'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp.obj: in function `run_demo()':
/home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp:27: undefined reference to `dai::SpiApi::SpiApi()'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp:28: undefined reference to `dai::SpiApi::set_send_spi_impl(unsigned char (*)(char const*))'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp:29: undefined reference to `dai::SpiApi::set_recv_spi_impl(unsigned char (*)(char*))'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp:37: undefined reference to `dai::SpiApi::req_message(dai::Message*, char const*)'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp:41: undefined reference to `void dai::SpiApi::parse_metadata<dai::RawImgDetections>(dai::Metadata*, dai::RawImgDetections&)'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp:47: undefined reference to `dai::SpiApi::free_message(dai::Message*)'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp:53: undefined reference to `dai::SpiApi::spi_pop_messages()'
/home/mohit/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: CMakeFiles/aws_demos.dir/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp.obj: in function `start_my_application':
/home/mohit/Documents/amazon-freertos/vendors/espressif/boards/esp32/aws_demos/application_code/depthaicode.cpp:62: undefined reference to `init_esp32_spi'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/aws_demos.dir/build.make:1057: aws_demos] Error 1
make[1]: *** [CMakeFiles/Makefile2:3227: CMakeFiles/aws_demos.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
make failed with exit code 2

Looks like the error in main.c is rectified but now there’s error in depthaicode.cpp

These are bunch of missing symbols - Where do you expect these symbols to be defined?

Where is the class SpiApi defined? Are you compiling that source?

Thanks.

SpiApi class is in “spi_api.hpp” and I have included it in depthaicode.cpp file too.

Just for your reference I am using this depthai api library and am using this example provided by them.

you may want to upload the map file here so we can see what modules are actually included in the project…

Agree with @RAc. It will be even better if you can share your code and build command you are using.

Thanks.

application_code.zip (7.8 KB)

I have this folder in amazon-freertos/vendors/espressif/boards/esp32/aws_demos path.

After adding the DepthAI Library in 3rd Party libraries folder, I updated the Cmakelist.txt which is in amazon-freertos/vendors/espressif/boards/esp32 path
So my Cmakelist.txt looks like this


# -------------------------------------------------------------------------------------------------
# FreeRTOS Console metadata
# -------------------------------------------------------------------------------------------------
if("${AFR_BOARD_NAME}" STREQUAL "esp32_devkitc")
    include("${CMAKE_CURRENT_LIST_DIR}/esp32_devkitc.cmake")
    set(ECC608_IN_USE FALSE)
endif()
if("${AFR_BOARD_NAME}" STREQUAL "esp32_wrover_kit")
    include("${CMAKE_CURRENT_LIST_DIR}/esp32_wrover_kit.cmake")
    set(ECC608_IN_USE FALSE)
endif()
if("${AFR_BOARD_NAME}" STREQUAL "esp32_plus_ecc608a_devkitc")
    include("${CMAKE_CURRENT_LIST_DIR}/esp32_plus_ecc608a_devkitc.cmake")
    set(ECC608_IN_USE TRUE)
endif()

# -------------------------------------------------------------------------------------------------
# Compiler settings
# -------------------------------------------------------------------------------------------------
# Mark the python dependencies as checked so that esp-idf does not check them since this is not
# needed when we are only generating metadata and not building the project.
if(AFR_METADATA_MODE)
    set(PYTHON_DEPS_CHECKED 1)
endif()

if(DEFINED ENV{IDF_PATH})
    message("WARNING: IDF_PATH environment variable is not cleared.
    If CMake is generating an error, consider clearing the IDF_PATH environment
    variable, and generating a clean build. This message can be ignored if
    CMake was successful.")
endif()



set(esp_idf_dir "${AFR_VENDORS_DIR}/espressif/esp-idf")
# Provides idf_import_components and idf_link_components
include(${esp_idf_dir}/tools/cmake/idf.cmake)
include(${esp_idf_dir}/tools/cmake/project_utils.cmake)


if(AFR_IS_TESTING)
    set(exe_target aws_tests)
else()
    set(exe_target aws_demos)
endif()

afr_mcu_port(compiler)

set(linker_flags "-Wl,--gc-sections" "-Wl,--cref" "-Wl,--Map=${exe_target}.map" "-Wl,--undefined=uxTopUsedPriority")

# Linker flags
target_link_options(
    AFR::compiler::mcu_port
    INTERFACE ${linker_flags}
)


# -------------------------------------------------------------------------------------------------
# FreeRTOS portable layers
# -------------------------------------------------------------------------------------------------
set(afr_ports_dir "${CMAKE_CURRENT_LIST_DIR}/../ports")
set(extra_components_dir "${CMAKE_CURRENT_LIST_DIR}/../components")
set(board_demos_dir "${CMAKE_CURRENT_LIST_DIR}/aws_demos")
set(board_tests_dir "${CMAKE_CURRENT_LIST_DIR}/aws_tests")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

if(AFR_IS_TESTING)
    set(board_dir "${board_tests_dir}")
    set(aws_credentials_include "${AFR_TESTS_DIR}/include")
else()
    set(board_dir "${board_demos_dir}")
    set(aws_credentials_include "${AFR_DEMOS_DIR}/include")
endif()

# Kernel
afr_mcu_port(kernel)
afr_glob_src(driver_src DIRECTORY "${esp_idf_dir}" RECURSE)

set(
    kernel_inc_dirs
    "${esp_idf_dir}/components/app_update/include/"
    "${esp_idf_dir}/components/bootloader_support/include"
    "${esp_idf_dir}/components/esp32/include"
    "${esp_idf_dir}/components/esp_event/include"
    "${esp_idf_dir}/components/efuse/include"
    "${esp_idf_dir}/components/driver/include"
    "${esp_idf_dir}/components/heap/include"
    "${esp_idf_dir}/components/log/include"
    "${esp_idf_dir}/components/nvs_flash/include"
    "${esp_idf_dir}/components/pthread/include"
    "${esp_idf_dir}/components/newlib/platform_include"
    "${esp_idf_dir}/components/soc/src/esp32/include"
    "${esp_idf_dir}/components/soc/soc/esp32/include"
    "${esp_idf_dir}/components/soc/include"
    "${esp_idf_dir}/components/spi_flash/include"
    "${esp_idf_dir}/components/vfs/include"
    "${esp_idf_dir}/components/esp_ringbuf/include/"
    "${extra_components_dir}/freertos/include"
    "${esp_idf_dir}/components/mbedtls/port/include"
    "${esp_idf_dir}/components/xtensa/esp32/include/xtensa"
    "${esp_idf_dir}/components/xtensa/esp32/include"
    "${esp_idf_dir}/components/xtensa/include"
    "${esp_idf_dir}/components/esp_rom/include"
    "${esp_idf_dir}/components/esp_timer/include"
    "${esp_idf_dir}/components/esp_common/include"
    "${esp_idf_dir}/components/esp_system/include"
    "${esp_idf_dir}/components/depthai-spi-api/depthai-shared/include"
)

if(AFR_ESP_FREERTOS_TCP)
    list(APPEND kernel_inc_dirs
    "${extra_components_dir}/freertos_tcpip/ethernet/include"
    "${extra_components_dir}/freertos_tcpip/smartconfig_ack/include"
    "${extra_components_dir}/freertos_tcpip/tcpip_adapter/include"
    "${AFR_MODULES_FREERTOS_PLUS_DIR}/standard/freertos_plus_tcp/portable/Compiler/GCC"
    "${esp_idf_dir}/components/xtensa"
    "${esp_idf_dir}/components/esp_wifi/include"
    "${esp_idf_dir}/components/esp_netif/include"
    "${esp_idf_dir}/components/esp_eth/include"
    )
else()
    list(APPEND kernel_inc_dirs
    "${esp_idf_dir}/components/tcpip_adapter/include"
    )
endif()

if(ECC608_IN_USE)
    set(mchp_dir "${AFR_VENDORS_DIR}/microchip")
    set(ecc608a_dir "${mchp_dir}/secure_elements")
    list(APPEND kernel_inc_dirs
        "${esp_idf_dir}/components/esp_ringbuf/include"
        "${board_dir}/config_files/ecc608a_pkcs11_config"
    )
else()
    list(APPEND kernel_inc_dirs
        "${board_dir}/config_files/default_pkcs11_config"
    )
endif()

target_include_directories(
    AFR::kernel::mcu_port
    INTERFACE
        ${kernel_inc_dirs}
        "${AFR_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/include/"
        "${aws_credentials_include}"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api/common"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api/depthai-shared"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api/depthai-spi-library"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api"
        "${board_dir}/config_files"
        "$<$<NOT:${AFR_METADATA_MODE}>:${CMAKE_BINARY_DIR}/config>"
)

# WiFi
afr_mcu_port(wifi)

if(AFR_ESP_FREERTOS_TCP)
target_link_libraries(
    AFR::wifi::mcu_port
    INTERFACE
    AFR::freertos_plus_tcp
)
else()
target_include_directories(
    AFR::wifi::mcu_port
    INTERFACE
        "${esp_idf_dir}/components/lwip/include/apps"
        "${esp_idf_dir}/components/lwip/include/apps/sntp"
        "${esp_idf_dir}/components/lwip/lwip/src/include"
        "${esp_idf_dir}/components/lwip/port/esp32/include"
        "${esp_idf_dir}/components/lwip/port/esp32/include/arch"
        "${esp_idf_dir}/components/protocomm/include/common"
        "${esp_idf_dir}/components/protocomm/include/security"
        "${esp_idf_dir}/components/protocomm/include/transports"
        "${esp_idf_dir}/components/wifi_provisioning/include"
        "${esp_idf_dir}/components/esp_wifi/include"
        "${esp_idf_dir}/components/esp_netif/include"
        "${esp_idf_dir}/components/esp_eth/include"
        "${esp_idf_dir}/components/soc/soc/include"
)
endif()

target_sources(
    AFR::wifi::mcu_port
    INTERFACE 
        "${afr_ports_dir}/wifi/iot_wifi.c"
)

# SoftAP Provisioning - Available ONLY when using LWIP stack
if( NOT AFR_ESP_FREERTOS_TCP )
    target_include_directories(
        AFR::wifi::mcu_port
        INTERFACE
            "${AFR_ROOT_DIR}/libraries/coreHTTP/source/dependency/3rdparty/http_parser"
            "${AFR_ROOT_DIR}/libraries/3rdparty/mbedtls/include"
            "${esp_idf_dir}/components/protobuf-c/protobuf-c"
            "${esp_idf_dir}/components/protocomm/proto-c"
            "${esp_idf_dir}/components/protocomm/src/common"
            "${esp_idf_dir}/components/wifi_provisioning/proto-c"
            "${esp_idf_dir}/components/esp_http_server/include"
    )
    target_sources(
        AFR::wifi::mcu_port
        INTERFACE
            "${afr_ports_dir}/wifi/iot_softap_wifi_provisioning.c"
            "${AFR_ROOT_DIR}/libraries/coreHTTP/source/dependency/3rdparty/http_parser/http_parser.c"
            "${AFR_ROOT_DIR}/libraries/coreHTTP/source/dependency/3rdparty/http_parser/http_parser.h"
            "${esp_idf_dir}/components/protobuf-c/protobuf-c/protobuf-c/protobuf-c.c"
            "${esp_idf_dir}/components/protocomm/proto-c/session.pb-c.c"
            "${esp_idf_dir}/components/protocomm/proto-c/sec0.pb-c.c"
            "${esp_idf_dir}/components/protocomm/proto-c/sec1.pb-c.c"
            "${esp_idf_dir}/components/protocomm/proto-c/constants.pb-c.c"
            "${esp_idf_dir}/components/protocomm/src/common/protocomm.c"
            "${esp_idf_dir}/components/protocomm/src/security/security1.c"
            "${esp_idf_dir}/components/protocomm/src/transports/protocomm_httpd.c"
            "${esp_idf_dir}/components/wifi_provisioning/proto-c/wifi_config.pb-c.c"
            "${esp_idf_dir}/components/wifi_provisioning/proto-c/wifi_constants.pb-c.c"
            "${esp_idf_dir}/components/wifi_provisioning/src/wifi_config.c"
    )
    target_link_libraries(
        AFR::wifi::mcu_port
        INTERFACE
            3rdparty::mbedtls
    )
endif()

# BLE
set(BLE_SUPPORTED 1 CACHE INTERNAL "BLE is supported on this platform.")

afr_mcu_port(ble_hal)

# Include Bluedroid HAL files as header files.
afr_glob_src( bluedroid_src DIRECTORY ${afr_ports_dir}/ble/bluedroid  RECURSE )
set_source_files_properties( ${bluedroid_src} PROPERTIES HEADER_FILE_ONLY TRUE )

# Include Nimble HAL files as header files.
afr_glob_src( nimble_src DIRECTORY ${afr_ports_dir}/ble/nimble  RECURSE )
set_source_files_properties( ${nimble_src} PROPERTIES HEADER_FILE_ONLY TRUE )

target_sources(
    AFR::ble_hal::mcu_port
    INTERFACE
        "${afr_ports_dir}/ble/iot_ble_hal_common_gap.c"
        "${afr_ports_dir}/ble/iot_ble_hal_gap.c"
        "${afr_ports_dir}/ble/iot_ble_hal_gatt_server.c"
        ${bluedroid_src}
        ${nimble_src}
)

target_include_directories(
    AFR::ble_hal::mcu_port
    INTERFACE
        "${esp_idf_dir}/components/bt/host/bluedroid/api/include/api"
        "${esp_idf_dir}/components/bt/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/porting/nimble/include"
        "${esp_idf_dir}/components/bt/host/nimble/port/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/nimble/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/nimble/host/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/nimble/host/services/ans/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/nimble/host/services/bas/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/nimble/host/services/gap/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/nimble/host/services/gatt/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/nimble/host/services/ias/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/nimble/host/services/lls/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/nimble/host/services/tps/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/nimble/host/util/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/nimble/host/store/ram/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/nimble/host/store/config/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/porting/npl/freertos/include"
        "${esp_idf_dir}/components/bt/host/nimble/nimble/ext/tinycrypt/include"
        "${esp_idf_dir}/components/bt/host/nimble/esp-hci/include"

        "${afr_ports_dir}/ble"
        "${afr_ports_dir}/ble/bluedroid"
        "${afr_ports_dir}/ble/nimble"
)

if (NOT AFR_METADATA_MODE)
    target_link_libraries(
        AFR::ble_hal::mcu_port
        INTERFACE
            idf::bt
    )
endif()

# PKCS11
if(ECC608_IN_USE)
    afr_mcu_port(pkcs11_implementation DEPENDS AFR::pkcs11_ecc608a)
    set(
        ecc608a_hal_src
            "${ecc608a_dir}/lib/hal/atca_hal.c"
            "${ecc608a_dir}/lib/hal/hal_freertos.c"
            "${ecc608a_dir}/lib/hal/hal_esp32_i2c.c"
            "${ecc608a_dir}/lib/hal/hal_esp32_timer.c"
            "${ecc608a_dir}/lib/hal/atca_hal.h"
            "${ecc608a_dir}/lib/hal/atca_start_config.h"
            "${ecc608a_dir}/lib/hal/atca_start_iface.h"
    )
    target_include_directories(
        AFR::pkcs11_implementation::mcu_port
        INTERFACE
            "${board_dir}/config_files/ecc608a_pkcs11_config"
    )
    target_sources(
        AFR::pkcs11_implementation::mcu_port
        INTERFACE
            "${ecc608a_hal_src}"
    )
else()
    afr_mcu_port(pkcs11_implementation DEPENDS AFR::pkcs11_mbedtls)
    target_include_directories(
        AFR::pkcs11_implementation::mcu_port
        INTERFACE
            "${board_dir}/config_files/default_pkcs11_config/"
    )
    target_sources(
        AFR::pkcs11_implementation::mcu_port
        INTERFACE
            "${afr_ports_dir}/pkcs11/core_pkcs11_pal.c"
    )
endif()

target_include_directories(
    AFR::pkcs11_implementation::mcu_port
    INTERFACE
        "${esp_idf_dir}/components/soc/soc/include"
)

if(AFR_ESP_FREERTOS_TCP)
# FreeRTOS Plus TCP
afr_mcu_port(freertos_plus_tcp)
target_sources(
    AFR::freertos_plus_tcp::mcu_port
    INTERFACE
        "${AFR_MODULES_FREERTOS_PLUS_DIR}/standard/freertos_plus_tcp/portable/BufferManagement/BufferAllocation_2.c"
        "${AFR_MODULES_FREERTOS_PLUS_DIR}/standard/freertos_plus_tcp/portable/NetworkInterface/esp32/NetworkInterface.c"
)

# Secure sockets
afr_mcu_port(secure_sockets)
target_link_libraries(
    AFR::secure_sockets::mcu_port
    INTERFACE AFR::secure_sockets_freertos_plus_tcp
)
else()

# Secure sockets
afr_mcu_port(secure_sockets)

target_sources(
    AFR::secure_sockets::mcu_port
    INTERFACE
        "${AFR_MODULES_ABSTRACTIONS_DIR}/secure_sockets/lwip/iot_secure_sockets.c"
)

target_include_directories(
    AFR::secure_sockets::mcu_port
    INTERFACE
        "${esp_idf_dir}/components/lwip/include/apps"
        "${esp_idf_dir}/components/lwip/include/apps/sntp"
        "${esp_idf_dir}/components/lwip/lwip/src/include"
        "${esp_idf_dir}/components/lwip/port/esp32/include"
        "${esp_idf_dir}/components/lwip/port/esp32/include/arch"
        "${esp_idf_dir}/components/lwip/include"
)

target_link_libraries(
    AFR::secure_sockets::mcu_port
    INTERFACE
        AFR::tls
        AFR::wifi
)

endif()

# Common I/O
afr_mcu_port(common_io)
target_sources(
    AFR::common_io::mcu_port
    INTERFACE
        "${afr_ports_dir}/common_io/iot_i2c.c"
        "${afr_ports_dir}/common_io/iot_spi.c"
        "${afr_ports_dir}/common_io/iot_uart.c"
        $<${AFR_IS_TESTING}:${afr_ports_dir}/common_io/iot_test_common_io_internal.c>
        # Add the header file to generate metadata for it so that
        # it is present in the code downloaded from FreeRTOS console.
        "${afr_ports_dir}/common_io/include/iot_board_gpio.h"
)
target_include_directories(
    AFR::common_io::mcu_port
    INTERFACE
        "${afr_ports_dir}/common_io/include"
        "${AFR_ROOT_DIR}/libraries/abstractions/common_io/test"
        "${esp_idf_dir}/components/soc/soc/include"
)


target_compile_options(
    AFR::common_io::mcu_port
    INTERFACE
    -Wno-implicit-function-declaration
    -Wno-format -Wno-maybe-uninitialized
    -Wno-pointer-sign
    -Wno-unused-but-set-variable
    -Wno-incompatible-pointer-types
)

if(AFR_IS_TESTING)
target_compile_definitions(
    AFR::compiler::mcu_port
    INTERFACE $<$<COMPILE_LANGUAGE:C>:${compiler_defined_symbols}>
    -DESP32
)
endif()

# OTA
# Need to get this validated
afr_mcu_port(ota)
target_sources(
    AFR::ota::mcu_port
    INTERFACE
        "${afr_ports_dir}/ota/aws_ota_pal.c"
        "${afr_ports_dir}/ota/aws_esp_ota_ops.c"
        "${afr_ports_dir}/ota/aws_esp_ota_ops.h"
)
target_include_directories(
    AFR::ota::mcu_port
    INTERFACE
        "${esp_idf_dir}/components/soc/soc/include"
)
target_link_libraries(
    AFR::ota::mcu_port
    INTERFACE
        AFR::crypto
        AFR::pkcs11
        AFR::ota_mqtt
        AFR::ota_http
)

# Add extra components to metadata
afr_files_to_console_metadata(
    "${extra_components_dir}"
)

# -------------------------------------------------------------------------------------------------
# FreeRTOS demos and tests
# -------------------------------------------------------------------------------------------------
afr_glob_src(config_files DIRECTORY "${board_dir}/config_files")

# If external project is set do not link IDF components to aws target
if (NOT IDF_PROJECT_EXECUTABLE)
    set(IDF_PROJECT_EXECUTABLE ${exe_target})
endif()

if (NOT IDF_EXECUTABLE_SRCS)
    set(IDF_EXECUTABLE_SRCS "${board_dir}/application_code/main.c" "${board_dir}/application_code/depthaicode.cpp"  ${extra_exe_sources})
endif()

add_executable(
    ${IDF_PROJECT_EXECUTABLE}
    ${IDF_EXECUTABLE_SRCS}
)

target_include_directories(
    ${IDF_PROJECT_EXECUTABLE}
    PUBLIC
        "${esp_idf_dir}/components/esp_ringbuf/include"
        $<TARGET_PROPERTY:AFR::kernel,INTERFACE_INCLUDE_DIRECTORIES>
        $<TARGET_PROPERTY:AFR::ble_hal::mcu_port,INTERFACE_INCLUDE_DIRECTORIES>
        $<TARGET_PROPERTY:AFR::wifi::mcu_port,INTERFACE_INCLUDE_DIRECTORIES>
)

target_link_libraries(
    ${IDF_PROJECT_EXECUTABLE}
    PRIVATE
        AFR::wifi
        AFR::utils
        AFR::ble
        AFR::common_io
)

if(AFR_METADATA_MODE)
    return()
endif()


# -------------------------------------------------------------------------------------------------
# Additional build configurations
# -------------------------------------------------------------------------------------------------

# TODO, workaround for permission issue in FreeRTOS console.
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux")
    execute_process(COMMAND chmod +x "${esp_idf_dir}/components/esptool_py/esptool/esptool.py")
endif()

if(ECC608_IN_USE)
set_source_files_properties(
    ${ecc608a_dir}/lib/pkcs11/pkcs11_token.c
    ${ecc608a_dir}/lib/pkcs11/pkcs11_object.c
    ${ecc608a_dir}/lib/basic/atca_helpers.c
    PROPERTIES COMPILE_FLAGS
    "-Wno-error=pointer-sign -Wno-error=char-subscripts"
)
endif()
set_source_files_properties(
    ${AFR_MODULES_C_SDK_DIR}/aws/greengrass/aws_greengrass_discovery.c
    ${AFR_DEMOS_DIR}/tcp/aws_tcp_echo_client_single_task.c
    ${AFR_DEMOS_DIR}/secure_sockets/iot_test_tcp.c
    ${AFR_DEMOS_DIR}/wifi/iot_test_wifi.c
    PROPERTIES COMPILE_FLAGS
    "-Wno-format"
)

set_source_files_properties(${AFR_DEMOS_DIR}/logging/iot_logging_task_dynamic_buffers.c
    PROPERTIES COMPILE_FLAGS
    "-Wno-format -Wno-uninitialized"
)

set_source_files_properties(${AFR_DEMOS_DIR}/ota/aws_test_ota_pal.c
    PROPERTIES COMPILE_FLAGS
    "-Wno-pointer-sign -Wno-sizeof-pointer-memaccess"
)

set_source_files_properties(${AFR_DEMOS_DIR}/ota/aws_test_ota_agent.c
    PROPERTIES COMPILE_FLAGS
    "-Wno-pointer-sign"
)

set_source_files_properties(${AFR_DEMOS_DIR}/posix/iot_test_posix_pthread.c
    PROPERTIES COMPILE_FLAGS
    "-Wno-int-conversion"
)

set_source_files_properties(${AFR_ROOT_DIR}/libraries/c_sdk/standard/mqtt/test/unit/iot_tests_mqtt_subscription.c
    PROPERTIES COMPILE_FLAGS
    "-Wno-restrict")

set(IDF_TARGET esp32)
set(ENV{IDF_PATH} ${esp_idf_dir})

# If external project has set sdkconfig.defaults do not overwrite
if (NOT IDF_SDKCONFIG_DEFAULTS)
    # Fetch sdkconfig.defaults and modify the custom partition table csv path
    file(READ "${board_dir}/sdkconfig.defaults" file_sdkconfig_default)
    string(REGEX REPLACE "partition-table.csv" "${board_dir}/partition-table.csv" file_sdkconfig_default "${file_sdkconfig_default}")
    file(WRITE "${CMAKE_BINARY_DIR}/sdkconfig.defaults" "${file_sdkconfig_default}")
    set(IDF_SDKCONFIG_DEFAULTS "${CMAKE_BINARY_DIR}/sdkconfig.defaults")
endif()

# Set sdkconfig generation path inside build
set(SDKCONFIG "${CMAKE_BINARY_DIR}/sdkconfig")

# Do some configuration for idf_import_components. This enables creation of artifacts (which might not be
# needed) for some projects
set(IDF_BUILD_ARTIFACTS ON)
set(IDF_BUILD_ARTIFACTS_DIR ${CMAKE_BINARY_DIR})

set(CMAKE_STATIC_LIBRARY_PREFIX "lib")

set_property(GLOBAL PROPERTY IDF_PROJECT_EXECUTABLE ${IDF_PROJECT_EXECUTABLE})

get_filename_component(
    ABS_EXTRA_COMPONENT_DIRS
    "${extra_components_dir}/freertos" ABSOLUTE
)

idf_build_component(${ABS_EXTRA_COMPONENT_DIRS})

get_filename_component(
    ABS_EXTRA_COMPONENT_DIRS
    "${extra_components_dir}/mbedtls" ABSOLUTE
)

idf_build_component(${ABS_EXTRA_COMPONENT_DIRS})

if(AFR_ESP_FREERTOS_TCP)
get_filename_component(
    ABS_NW_EXTRA_COMPONENT_DIRS
    "${extra_components_dir}/freertos_tcpip" ABSOLUTE
)

idf_build_component(${ABS_EXTRA_COMPONENT_DIRS})
endif()

idf_build_process(esp32
                    SDKCONFIG ${CMAKE_BINARY_DIR}/sdkconfig
                    SDKCONFIG_DEFAULTS ${CMAKE_BINARY_DIR}/sdkconfig.defaults
                    BUILD_DIR ${CMAKE_BINARY_DIR})

idf_build_get_property(idf_compile_options "COMPILE_OPTIONS")
idf_build_get_property(idf_c_compile_options "C_COMPILE_OPTIONS")
idf_build_get_property(idf_cxx_compile_options "CXX_COMPILE_OPTIONS")
idf_build_get_property(idf_compile_definitions "COMPILE_DEFINITIONS")

# Compiler flags
target_compile_options(
    AFR::compiler::mcu_port
    INTERFACE
    $<$<COMPILE_LANGUAGE:C>:${idf_c_compile_options}>
    $<$<COMPILE_LANGUAGE:CXX>:${idf_cxx_compile_options}>
    -Wno-stringop-overflow
    -Wno-bool-operation
    -Wno-sizeof-pointer-div
    -Wno-nonnull
)

# Compiler definitions/macros
target_compile_definitions(
    AFR::compiler::mcu_port
    INTERFACE
    ${idf_compile_definitions}
    -DESP_PLATFORM
)

if(NOT AFR_ESP_FREERTOS_TCP)
target_compile_definitions(
    AFR::compiler::mcu_port
    INTERFACE $<$<COMPILE_LANGUAGE:C>:${compiler_defined_symbols}>
    -DAFR_ESP_LWIP
)
endif()

target_compile_options(
    AFR::compiler::mcu_port
    INTERFACE
    ${idf_compile_options}
)

idf_build_set_property(PROJECT_NAME ${IDF_PROJECT_EXECUTABLE})
idf_build_set_property(EXECUTABLE_NAME ${IDF_PROJECT_EXECUTABLE})
idf_build_set_property(PROJECT_DIR ${AFR_ROOT_DIR})
idf_build_set_property(EXECUTABLE ${IDF_PROJECT_EXECUTABLE})
idf_project_generate_description_file(${CMAKE_BINARY_DIR}/project_description.json)
idf_build_executable(${IDF_PROJECT_EXECUTABLE})
idf_build_set_property(EXECUTABLE_DIR ${CMAKE_BINARY_DIR})

# This is a hack to have IDF build system use PRIVATE keyword when
# calling target_link_libraries() on aws_demos target. This is necessary
# as CMake doesn't allow mixing target_link_libraries() call signature
# for the same target.
function(target_link_libraries)
    set(_args ARGV)
    get_property(exe_target GLOBAL PROPERTY IDF_PROJECT_EXECUTABLE)
    if (${ARGV0} STREQUAL ${exe_target})
        list(INSERT ${_args} 1 PRIVATE)
    endif()
    _target_link_libraries(${${_args}})
endfunction()

# Override IDF's native toolchain file
set(IDF_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE})

Here the main part I added was in line number 141

target_include_directories(
    AFR::kernel::mcu_port
    INTERFACE
        ${kernel_inc_dirs}
        "${AFR_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/include/"
        "${aws_credentials_include}"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api/common"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api/depthai-shared"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api/depthai-spi-library"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api"
        "${board_dir}/config_files"
        "$<$<NOT:${AFR_METADATA_MODE}>:${CMAKE_BINARY_DIR}/config>"
)

To build and flash I am using followinf command

idf.py -DVENDOR=espressif -DBOARD=esp32_wrover_kit -DCOMPILER=xtensa-esp32 build

There is no map file…

@RAc , Sorry but where to find map file ?

Hi Prakash,

I don’t mean to sound condescending, but I would very strongly advise you to familiarize yourself with the basics of embedded development before attempting to jump into actual coding. If you do not know (yet) what linker command files and map files are and how they relate to each other (both are closely related to controlling distribution of code and data in physical memory), you are missing central and vital pieces and will not be able to understand, let alone debug the runtime behavior of your application. Thus, it is in your own interest to take a step back and make step 1 before step 2.

There are many places on the internet that explain the inner workings. Here is one that looks reasonably decent. After reading through it or a similar tutorial, you should be able to not only know how to produce a map file and where to find it, but also interpret it (which may very well answer the question that you’re stuck at right now).

Again, please don’t misunderstand this posting; all I’m doing is trying to empower you to answer the questions yourself before you depend on others to answer them for you.

Hey @RAc , It’s absolutely fine… I am indeed new to FreeRTOS and have been exploring recently. Yes I have worked a little bit on linker files while implementing OTA but maybe confused with name “map file”. However I shall have a look on the link which you have shared and as you said shall surely go in depth.

Thank you once again.

Since you did not share the complete code, I was not able to build it. But looking at it, I think you should only have one function in depthaicode.hpp. Here is the updated one:

application_code.zip (7.4 KB)

If your only change in CMakeLists.txt is the following, then you are just adding include directories but not compiling the corresponding source files:

target_include_directories(
    AFR::kernel::mcu_port
    INTERFACE
        ${kernel_inc_dirs}
        "${AFR_KERNEL_DIR}/portable/ThirdParty/GCC/Xtensa_ESP32/include/"
        "${aws_credentials_include}"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api/common"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api/depthai-shared"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api/depthai-spi-library"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api"
        "${board_dir}/config_files"
        "$<$<NOT:${AFR_METADATA_MODE}>:${CMAKE_BINARY_DIR}/config>"
)

You need to use target_sources function to add source files. If you are using AFR::kernel::mcu_port for adding your library (which is not a good idea in the first place), you need to do something like the following (replace xxx, yyy and zzz with real cpp files):

target_sources(
    AFR::kernel::mcu_port
    INTERFACE
        "${AFR_3RDPARTY_DIR}/depthai-spi-api/common/xxx.cpp"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api/depthai-shared/yyy.cpp"
        "${AFR_3RDPARTY_DIR}/depthai-spi-api/depthai-spi-library/zzz.cpp"
)

Thanks.

Hello @aggarg ,
As you suggested I used target_sources and updated all files. Thanks for the solution and I guess I have come out of that Undefined reference to *** error.

However now these header files in the library are not able to locate basic libraries like

#include "lwip/sockets.h"
#include "lwip/dns.h"
#include "lwip/netdb.h"
#include "lwip/igmp.h"

#include "esp_wifi.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"
#include "nvs_flash.h"
#include "soc/rtc_periph.h"
#include "esp32/rom/cache.h"
#include "esp_log.h"
#include "esp_spi_flash.h"
#include "esp_intr_alloc.h"

It shows the following error

 fatal error: lwip/sockets.h: No such file or directory
 #include "lwip/sockets.h"
          ^~~~~~~~~~~~~~~~
compilation terminated.

Not sure why this is happening though.

What other changes you made that can introduce this? You need to ensure that you are specifying 2 information in CMakeLists.txt:

  1. List of source files to compile which is done using target_sources.
  2. List of directories where the compiler tries to find include files - this is done using target_include_directories.

The only other thing I can suggest is to try a clean build.

Thanks.