Page 1 of 1

ESP32S3 ESP-IDF v5.2.2 Azure IoTHub support integration

Posted: Sat Aug 03, 2024 10:32 am
by dmitrij999
Hello!

I faced with Azure IoTHub integration trouble, trying to integrate it into project based on ESP-IDF v5.2.2.
esp-azure from components registry breaks down the project build, and conflicts with usb_host_cdc_acm, therefore I'm trying to integrate the azure-iot-middleware-freertos: https://github.com/Azure/azure-iot-midd ... /tree/main

When I'm fetching the sample (https://github.com/Azure-Samples/iot-mi ... /tree/main), the project works well on the top of ESP-IDF v5.2.2. But when I'm trying to integrate it to my existing project, the bunch of build errors occures.
The last build error is the abscence of file threading_alt.h for mbedtls and I have no idea how does the approriate file look like.

Here is the build logs

Code: Select all

 *  Executing task: ninja  

[12/1055] Generating ../../partition_table/partition-table.bin
Partition table binary generated. Contents:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x10000,32K,
phy_init,data,phy,0x18000,4K,
otadata,data,ota,0x19000,8K,
ota_0,app,ota_0,0x20000,3004K,
ota_1,app,ota_1,0x310000,3004K,
storage,data,fat,0x5ff000,2M,
nvs_key,data,nvs_keys,0x7ff000,4K,encrypted
*******************************************************************************
[424/1055] Performing configure step for 'bootloader'
-- Found Git: /usr/bin/git (found version "2.34.1") 
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32s3
-- Project sdkconfig file /home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/sdkconfig
-- Compiler supported targets: xtensa-esp-elf
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of time_t
-- Check size of time_t - done
-- Adding linker script /home/dmitrij999/esp/esp-idf-v5.2.2/components/soc/esp32s3/ld/esp32s3.peripherals.ld
-- Bootloader project name: "bootloader" version: 1
-- Adding linker script /home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_rom/esp32s3/ld/esp32s3.rom.ld
-- Adding linker script /home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld
-- Adding linker script /home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld
-- Adding linker script /home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld
-- Adding linker script /home/dmitrij999/esp/esp-idf-v5.2.2/components/bootloader/subproject/main/ld/esp32s3/bootloader.ld
-- Adding linker script /home/dmitrij999/esp/esp-idf-v5.2.2/components/bootloader/subproject/main/ld/esp32s3/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp_app_format esp_bootloader_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa
-- Component paths: /home/dmitrij999/esp/esp-idf-v5.2.2/components/bootloader /home/dmitrij999/esp/esp-idf-v5.2.2/components/bootloader_support /home/dmitrij999/esp/esp-idf-v5.2.2/components/efuse /home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_app_format /home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_bootloader_format /home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_common /home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_hw_support /home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_rom /home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_system /home/dmitrij999/esp/esp-idf-v5.2.2/components/esptool_py /home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos /home/dmitrij999/esp/esp-idf-v5.2.2/components/hal /home/dmitrij999/esp/esp-idf-v5.2.2/components/log /home/dmitrij999/esp/esp-idf-v5.2.2/components/bootloader/subproject/main /home/dmitrij999/esp/esp-idf-v5.2.2/components/bootloader/subproject/components/micro-ecc /home/dmitrij999/esp/esp-idf-v5.2.2/components/newlib /home/dmitrij999/esp/esp-idf-v5.2.2/components/partition_table /home/dmitrij999/esp/esp-idf-v5.2.2/components/soc /home/dmitrij999/esp/esp-idf-v5.2.2/components/spi_flash /home/dmitrij999/esp/esp-idf-v5.2.2/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/build/bootloader
[481/1055] Performing build step for 'bootloader'
[1/112] Generating project_elf_src_esp32s3.c
[2/112] Building C object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/eri.c.obj
[3/112] Building C object CMakeFiles/bootloader.elf.dir/project_elf_src_esp32s3.c.obj
[4/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/interrupts.c.obj
[5/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/lldesc.c.obj
[6/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/dport_access_common.c.obj
[7/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/gpio_periph.c.obj
[8/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/adc_periph.c.obj
[9/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/gdma_periph.c.obj
[10/112] Building C object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/xt_trax.c.obj
[11/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/uart_periph.c.obj
[12/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/dedic_gpio_periph.c.obj
[13/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/sdm_periph.c.obj
[14/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/pcnt_periph.c.obj
[15/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/rmt_periph.c.obj
[16/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/ledc_periph.c.obj
[17/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/spi_periph.c.obj
[18/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/i2s_periph.c.obj
[19/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/lcd_periph.c.obj
[20/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/temperature_sensor_periph.c.obj
[21/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/mcpwm_periph.c.obj
[22/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/sdmmc_periph.c.obj
[23/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/i2c_periph.c.obj
[24/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/mpi_periph.c.obj
[25/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/timer_periph.c.obj
[26/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/twai_periph.c.obj
[27/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/usb_periph.c.obj
[28/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/usb_dwc_periph.c.obj
[29/112] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/hal_utils.c.obj
[30/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/touch_sensor_periph.c.obj
[31/112] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/mpu_hal.c.obj
[32/112] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32s3/esp_efuse_rtc_calib.c.obj
[33/112] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32s3/rtc_io_periph.c.obj
[34/112] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/esp32s3/efuse_hal.c.obj
[35/112] Building C object esp-idf/spi_flash/CMakeFiles/__idf_spi_flash.dir/spi_flash_wrap.c.obj
[36/112] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/mmu_hal.c.obj
[37/112] Building C object esp-idf/esp_bootloader_format/CMakeFiles/__idf_esp_bootloader_format.dir/esp_bootloader_desc.c.obj
[38/112] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/efuse_hal.c.obj
[39/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_efuse.c.obj
[40/112] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/cache_hal.c.obj
[41/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common.c.obj
[42/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_mem.c.obj
[43/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random.c.obj
[44/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_init.c.obj
[45/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/secure_boot.c.obj
[46/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random_esp32s3.c.obj
[47/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common_loader.c.obj
[48/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/bootloader_flash/src/bootloader_flash_config_esp32s3.c.obj
[49/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_partitions.c.obj
[50/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_encrypt.c.obj
[51/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_loader.c.obj
[52/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console_loader.c.obj
[53/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/bootloader_flash/src/flash_qio_mode.c.obj
[54/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32s3/bootloader_sha.c.obj
[55/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32s3/bootloader_soc.c.obj
[56/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_init.c.obj
[57/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console.c.obj
[58/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_panic.c.obj
[59/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32s3/bootloader_esp32s3.c.obj
[60/112] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32s3/esp_efuse_fields.c.obj
[61/112] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32s3/esp_efuse_table.c.obj
[62/112] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_fields.c.obj
[63/112] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/efuse_controller/keys/with_key_purposes/esp_efuse_api_key.c.obj
[64/112] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32s3/esp_efuse_utility.c.obj
[65/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/bootloader_flash/src/bootloader_flash.c.obj
[66/112] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_api.c.obj
[67/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp_image_format.c.obj
[68/112] Building C object esp-idf/esp_system/CMakeFiles/__idf_esp_system.dir/esp_err.c.obj
[69/112] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/esp_memory_utils.c.obj
[70/112] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32s3/cpu_region_protect.c.obj
[71/112] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_utility.c.obj
[72/112] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/cpu.c.obj
[73/112] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_crc.c.obj
[74/112] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_utility.c.obj
[75/112] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32s3/rtc_clk_init.c.obj
[76/112] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32s3/chip_info.c.obj
[77/112] Building C object esp-idf/esp_common/CMakeFiles/__idf_esp_common.dir/src/esp_err_to_name.c.obj
[78/112] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_sys.c.obj
[79/112] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_efuse.c.obj
[80/112] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_uart.c.obj
[81/112] Building ASM object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_longjmp.S.obj
[82/112] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_systimer.c.obj
[83/112] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32s3/rtc_init.c.obj
[84/112] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32s3/rtc_time.c.obj
[85/112] Building ASM object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_cache_writeback_esp32s3.S.obj
[86/112] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_spiflash.c.obj
[87/112] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_noos.c.obj
[88/112] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_wdt.c.obj
[89/112] Building C object esp-idf/micro-ecc/CMakeFiles/__idf_micro-ecc.dir/uECC_verify_antifault.c.obj
[90/112] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_cache_esp32s2_esp32s3.c.obj
[91/112] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/bootloader_start.c.obj
[92/112] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32s3/rtc_sleep.c.obj
[93/112] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log.c.obj
[94/112] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_buffers.c.obj
[95/112] Linking C static library esp-idf/log/liblog.a
[96/112] Linking C static library esp-idf/esp_rom/libesp_rom.a
[97/112] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32s3/rtc_clk.c.obj
[98/112] Linking C static library esp-idf/esp_common/libesp_common.a
[99/112] Linking C static library esp-idf/esp_hw_support/libesp_hw_support.a
[100/112] Linking C static library esp-idf/esp_system/libesp_system.a
[101/112] Linking C static library esp-idf/efuse/libefuse.a
[102/112] Linking C static library esp-idf/bootloader_support/libbootloader_support.a
[103/112] Linking C static library esp-idf/esp_bootloader_format/libesp_bootloader_format.a
[104/112] Linking C static library esp-idf/spi_flash/libspi_flash.a
[105/112] Linking C static library esp-idf/hal/libhal.a
[106/112] Linking C static library esp-idf/micro-ecc/libmicro-ecc.a
[107/112] Linking C static library esp-idf/soc/libsoc.a
[108/112] Linking C static library esp-idf/xtensa/libxtensa.a
[109/112] Linking C static library esp-idf/main/libmain.a
[110/112] Linking C executable bootloader.elf
[111/112] Generating binary image from built executable
esptool.py v4.7.0
Creating esp32s3 image...
Merged 2 ELF sections
Successfully created esp32s3 image.


...


[1000/1055] Building C object esp-idf/azure_utilities/CMakeFiles/__idf_azure_utilities.dir/mbedtls_freertos_port.c.obj
In file included from /home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/esp_additions/include/freertos/idf_additions.h:22,
                 from /home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/FreeRTOS-Kernel/include/freertos/FreeRTOS.h:1533,
                 from /home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_utilities/mbedtls_freertos_port.c:13:
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_utilities/mbedtls_freertos_port.c: In function 'mbedtls_platform_mutex_init':
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_utilities/mbedtls_freertos_port.c:126:56: warning: passing argument 2 of 'xQueueCreateMutexStatic' from incompatible pointer type [-Wincompatible-pointer-types]
  126 |     pMutex->mutexHandle = xSemaphoreCreateMutexStatic( &( pMutex->mutexStorage ) );
/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/FreeRTOS-Kernel/include/freertos/semphr.h:736:111: note: in definition of macro 'xSemaphoreCreateMutexStatic'
  736 |     #define xSemaphoreCreateMutexStatic( pxMutexBuffer )    xQueueCreateMutexStatic( queueQUEUE_TYPE_MUTEX, ( pxMutexBuffer ) )
      |                                                                                                               ^~~~~~~~~~~~~
In file included from /home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/esp_additions/include/freertos/idf_additions.h:21:
/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/FreeRTOS-Kernel/include/freertos/queue.h:1347:56: note: expected 'StaticQueue_t *' {aka 'struct xSTATIC_QUEUE *'} but argument is of type 'int *'
 1347 |                                        StaticQueue_t * pxStaticQueue ) PRIVILEGED_FUNCTION;
      |                                        ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
[1005/1055] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/http_server.cpp.obj
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:19:30: warning: missing initializer for member 'device_certs::https_server_cert_len' [-Wmissing-field-initializers]
   19 | static device_certs crts = {0};
      |                              ^
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:19:30: warning: missing initializer for member 'device_certs::https_server_key' [-Wmissing-field-initializers]
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:19:30: warning: missing initializer for member 'device_certs::https_server_key_len' [-Wmissing-field-initializers]
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:19:30: warning: missing initializer for member 'device_certs::ota_root_cert' [-Wmissing-field-initializers]
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:19:30: warning: missing initializer for member 'device_certs::ota_root_cert_len' [-Wmissing-field-initializers]
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp: In function 'esp_err_t fetch_post_request_contents(char*, httpd_req_t*)':
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:164:9: warning: variable 'received' set but not used [-Wunused-but-set-variable]
  164 |     int received = 0;
      |         ^~~~~~~~
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp: At global scope:
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:191:1: warning: missing initializer for member 'httpd_uri::user_ctx' [-Wmissing-field-initializers]
  191 | };
      | ^
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:272:1: warning: missing initializer for member 'httpd_uri::user_ctx' [-Wmissing-field-initializers]
  272 | };
      | ^
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:296:1: warning: missing initializer for member 'httpd_uri::user_ctx' [-Wmissing-field-initializers]
  296 | };
      | ^
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:330:1: warning: missing initializer for member 'httpd_uri::user_ctx' [-Wmissing-field-initializers]
  330 | };
      | ^
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:161:18: warning: 'esp_err_t fetch_post_request_contents(char*, httpd_req_t*)' defined but not used [-Wunused-function]
  161 | static esp_err_t fetch_post_request_contents(char * buf, httpd_req_t *req) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:23:17: warning: 'cmd_id' defined but not used [-Wunused-variable]
   23 | static uint32_t cmd_id = 1000;                              // Increment after each command send
      |                 ^~~~~~
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp: In function 'void clean_command_response_by_rpc_id(int)':
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:86:35: warning: iteration 3 invokes undefined behavior [-Waggressive-loop-optimizations]
   86 |         if (commands_responses[i].rpc_id == id) {
      |             ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/main/http_server.cpp:85:23: note: within this loop
   85 |     for (int i = 0; i < MAX_RPC_PAYLOAD_LEN; i++) {
[1006/1055] Building C object esp-idf/azure_utilities/CMakeFiles/__idf_azure_utilities.dir/azure_sample_crypto_mbedtls.c.obj
FAILED: esp-idf/azure_utilities/CMakeFiles/__idf_azure_utilities.dir/azure_sample_crypto_mbedtls.c.obj 
/home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc -DESP_PLATFORM -DIDF_VER=\"v5.2.2-dirty\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/build/config -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/config/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/config/include/freertos -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/config/xtensa/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/config/xtensa/include/freertos -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/FreeRTOS-Kernel/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/FreeRTOS-Kernel/include/freertos -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/esp_additions/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/esp_additions/include/freertos -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/azure-configs -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_utilities -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/newlib/platform_include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_hw_support/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_hw_support/include/soc -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_hw_support/include/soc/esp32s3 -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_hw_support/port/esp32s3/. -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/heap/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/log/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/soc/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/soc/esp32s3 -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/soc/esp32s3/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/hal/platform_port/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/hal/esp32s3/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/hal/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_rom/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_rom/include/esp32s3 -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_rom/esp32s3 -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_common/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_system/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_system/port/soc -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_system/port/include/private -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/xtensa/esp32s3/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/xtensa/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/xtensa/deprecated_include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_timer/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/include/apps -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/include/apps/sntp -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/lwip/src/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/port/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/port/freertos/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/port/esp32xx/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/port/esp32xx/include/arch -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/port/esp32xx/include/sys -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/port/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/mbedtls/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/mbedtls/library -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/esp_crt_bundle/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/mbedtls/3rdparty/everest/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/mbedtls/3rdparty/p256-m -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/mbedtls/3rdparty/p256-m/p256-m -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/source/include -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/source/interface -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/ports/coreMQTT -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/libraries/coreMQTT/test/unit-test/logging -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/libraries/azure-sdk-for-c/sdk/inc -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/libraries/coreMQTT/source/include -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/libraries/coreMQTT/source/interface -mlongcalls  -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fno-shrink-wrap -fmacro-prefix-map=/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule=. -fmacro-prefix-map=/home/dmitrij999/esp/esp-idf-v5.2.2=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/azure_utilities/CMakeFiles/__idf_azure_utilities.dir/azure_sample_crypto_mbedtls.c.obj -MF esp-idf/azure_utilities/CMakeFiles/__idf_azure_utilities.dir/azure_sample_crypto_mbedtls.c.obj.d -o esp-idf/azure_utilities/CMakeFiles/__idf_azure_utilities.dir/azure_sample_crypto_mbedtls.c.obj -c /home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_utilities/azure_sample_crypto_mbedtls.c
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_utilities/azure_sample_crypto_mbedtls.c: In function 'Crypto_Init':
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_utilities/azure_sample_crypto_mbedtls.c:17:5: error: implicit declaration of function 'mbedtls_threading_set_alt' [-Werror=implicit-function-declaration]
   17 |     mbedtls_threading_set_alt( mbedtls_platform_mutex_init,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
      ^~~~~~~~

...

[1010/1055] Building C object esp-idf/azure_transport/CMakeFiles/__idf_azure_transport.dir/transport_socket.c.obj
In file included from /home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_socket.c:30:
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/libraries/coreMQTT/test/unit-test/logging/logging_stack.h:82: warning: "SdkLog" redefined
   82 |     #define SdkLog( string )    printf string
      | 
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_socket.c:27: note: this is the location of the previous definition
   27 |     #define SdkLog( message )    vLoggingPrintf message
      | 
[1013/1055] Building C object esp-idf/azure_transport/CMakeFiles/__idf_azure_transport.dir/transport_tls_socket_using_mbedtls.c.obj
FAILED: esp-idf/azure_transport/CMakeFiles/__idf_azure_transport.dir/transport_tls_socket_using_mbedtls.c.obj 
/home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc -DESP_PLATFORM -DIDF_VER=\"v5.2.2-dirty\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/build/config -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/config/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/config/include/freertos -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/config/xtensa/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/config/xtensa/include/freertos -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/FreeRTOS-Kernel/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/FreeRTOS-Kernel/include/freertos -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/esp_additions/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/freertos/esp_additions/include/freertos -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/azure-configs -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/newlib/platform_include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_hw_support/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_hw_support/include/soc -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_hw_support/include/soc/esp32s3 -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_hw_support/port/esp32s3/. -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/heap/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/log/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/soc/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/soc/esp32s3 -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/soc/esp32s3/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/hal/platform_port/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/hal/esp32s3/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/hal/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_rom/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_rom/include/esp32s3 -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_rom/esp32s3 -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_common/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_system/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_system/port/soc -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_system/port/include/private -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/xtensa/esp32s3/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/xtensa/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/xtensa/deprecated_include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/esp_timer/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/include/apps -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/include/apps/sntp -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/lwip/src/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/port/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/port/freertos/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/port/esp32xx/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/port/esp32xx/include/arch -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/lwip/port/esp32xx/include/sys -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/port/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/mbedtls/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/mbedtls/library -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/esp_crt_bundle/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/mbedtls/3rdparty/everest/include -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/mbedtls/3rdparty/p256-m -I/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/mbedtls/3rdparty/p256-m/p256-m -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_utilities -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/source/include -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/source/interface -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/ports/coreMQTT -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/libraries/coreMQTT/test/unit-test/logging -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/libraries/azure-sdk-for-c/sdk/inc -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/libraries/coreMQTT/source/include -I/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/libraries/coreMQTT/source/interface -mlongcalls  -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fno-shrink-wrap -fmacro-prefix-map=/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule=. -fmacro-prefix-map=/home/dmitrij999/esp/esp-idf-v5.2.2=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/azure_transport/CMakeFiles/__idf_azure_transport.dir/transport_tls_socket_using_mbedtls.c.obj -MF esp-idf/azure_transport/CMakeFiles/__idf_azure_transport.dir/transport_tls_socket_using_mbedtls.c.obj.d -o esp-idf/azure_transport/CMakeFiles/__idf_azure_transport.dir/transport_tls_socket_using_mbedtls.c.obj -c /home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_tls_socket_using_mbedtls.c
In file included from /home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_tls_socket_using_mbedtls.c:37:
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure/azure-iot-middleware-freertos/libraries/coreMQTT/test/unit-test/logging/logging_stack.h:82: warning: "SdkLog" redefined
   82 |     #define SdkLog( string )    printf string
      | 
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_tls_socket_using_mbedtls.c:34: note: this is the location of the previous definition
   34 |     #define SdkLog( message )    vLoggingPrintf message
      | 
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_tls_socket_using_mbedtls.c: In function 'setPrivateKey':
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_tls_socket_using_mbedtls.c:332:21: error: too few arguments to function 'mbedtls_pk_parse_key'
  332 |     lMbedtlsError = mbedtls_pk_parse_key( &( pxSslContext->privKey ),
      |                     ^~~~~~~~~~~~~~~~~~~~
In file included from /home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/mbedtls/include/mbedtls/ssl_ciphersuites.h:16,
                 from /home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/mbedtls/include/mbedtls/ssl.h:20,
                 from /home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_tls_socket_using_mbedtls.c:53:
/home/dmitrij999/esp/esp-idf-v5.2.2/components/mbedtls/mbedtls/include/mbedtls/pk.h:1101:5: note: declared here
 1101 | int mbedtls_pk_parse_key(mbedtls_pk_context *ctx,
      |     ^~~~~~~~~~~~~~~~~~~~
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_tls_socket_using_mbedtls.c: In function 'initMbedtls':
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_tls_socket_using_mbedtls.c:608:5: error: implicit declaration of function 'mbedtls_threading_set_alt'; did you mean 'mbedtls_asn1_get_alg'? [-Werror=implicit-function-declaration]
  608 |     mbedtls_threading_set_alt( mbedtls_platform_mutex_init,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
      |     mbedtls_asn1_get_alg
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_tls_socket_using_mbedtls.c:619:49: error: 'mbedtls_platform_entropy_poll' undeclared (first use in this function); did you mean 'mbedtls_platform_mutex_lock'?
  619 |                                                 mbedtls_platform_entropy_poll,
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                 mbedtls_platform_mutex_lock
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_tls_socket_using_mbedtls.c:619:49: note: each undeclared identifier is reported only once for each function it appears in
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_tls_socket_using_mbedtls.c: In function 'TLS_Socket_Disconnect':
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_transport/transport_tls_socket_using_mbedtls.c:841:5: error: implicit declaration of function 'mbedtls_threading_free_alt' [-Werror=implicit-function-declaration]
  841 |     mbedtls_threading_free_alt();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
Components are in archive available by link: https://disk.yandex.ru/d/gOE699htI6SAOw

Re: ESP32S3 ESP-IDF v5.2.2 Azure IoTHub support integration

Posted: Wed Aug 07, 2024 8:56 am
by dmitrij999
For now, I've restructured my Azure components in my project, but build finishes with linking error

Components https://disk.yandex.ru/d/2MeNL3onmCBdFA

Build log (undefined reference to)

Code: Select all

/home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/azure_management/libazure_management.a(azure_management.cpp.obj):(.literal._ZL36prvConnectToServerWithBackoffRetriesPKcmP18NetworkCredentialsP14NetworkContext+0x10): undefined reference to `_Z33BackoffAlgorithm_InitializeParamsP23BackoffAlgorithmContextttm'
/home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/azure_management/libazure_management.a(azure_management.cpp.obj):(.literal._ZL36prvConnectToServerWithBackoffRetriesPKcmP18NetworkCredentialsP14NetworkContext+0x14): undefined reference to `_Z18TLS_Socket_ConnectP14NetworkContextPKctPK18NetworkCredentialsmm'
/home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/azure_management/libazure_management.a(azure_management.cpp.obj):(.literal._ZL36prvConnectToServerWithBackoffRetriesPKcmP18NetworkCredentialsP14NetworkContext+0x1c): undefined reference to `_Z31BackoffAlgorithm_GetNextBackoffP23BackoffAlgorithmContextmPt'
/home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/azure_management/libazure_management.a(azure_management.cpp.obj):(.literal._Z11azureWorkerPv+0x18): undefined reference to `_Z15TLS_Socket_SendP14NetworkContextPKvj'
/home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/azure_management/libazure_management.a(azure_management.cpp.obj):(.literal._Z11azureWorkerPv+0x1c): undefined reference to `_Z15TLS_Socket_RecvP14NetworkContextPvj'
/home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/azure_management/libazure_management.a(azure_management.cpp.obj):(.literal._Z11azureWorkerPv+0x34): undefined reference to `_Z11Crypto_HMACPKhmS0_mPhmPm'
/home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/azure_management/libazure_management.a(azure_management.cpp.obj):(.literal._Z11azureWorkerPv+0x7c): undefined reference to `_Z21TLS_Socket_DisconnectP14NetworkContext'
/home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/azure_management/libazure_management.a(azure_management.cpp.obj): in function `_ZL36prvConnectToServerWithBackoffRetriesPKcmP18NetworkCredentialsP14NetworkContext':
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_management/azure_management.cpp:590:(.text._ZL36prvConnectToServerWithBackoffRetriesPKcmP18NetworkCredentialsP14NetworkContext+0x14): undefined reference to `_Z33BackoffAlgorithm_InitializeParamsP23BackoffAlgorithmContextttm'
/home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: /home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_management/azure_management.cpp:603:(.text._ZL36prvConnectToServerWithBackoffRetriesPKcmP18NetworkCredentialsP14NetworkContext+0x48): undefined reference to `_Z18TLS_Socket_ConnectP14NetworkContextPKctPK18NetworkCredentialsmm'
/home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: /home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_management/azure_management.cpp:616:(.text._ZL36prvConnectToServerWithBackoffRetriesPKcmP18NetworkCredentialsP14NetworkContext+0x6e): undefined reference to `_Z31BackoffAlgorithm_GetNextBackoffP23BackoffAlgorithmContextmPt'
/home/dmitrij999/esp/esp-tools/v5.2.2/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/azure_management/libazure_management.a(azure_management.cpp.obj): in function `_Z11azureWorkerPv':
/home/dmitrij999/esp32-workspace/v5.2.2/IgnisSmartModule/components/azure_management/azure_management.cpp:361:(.text._Z11azureWorkerPv+0x2bb): undefined reference to `_Z21TLS_Socket_DisconnectP14NetworkContext'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

 *  The terminal process "ninja" terminated with exit code: 1. 
sample-azure-iot CMakeLists

Code: Select all

# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT

cmake_minimum_required(VERSION 3.19)

#set(ROOT_PATH
#    ${CMAKE_CURRENT_LIST_DIR}/../..
#)

# kconfig does not support multiline strings.
# For certificates, we use as a workaround escaping the newlines
# in certificates and keys so they can be entered as a single
# string in kconfig.
# The routine below unescapes the newlines so the values
# can be correctly interpreted by the code.
if(EXISTS "${CMAKE_BINARY_DIR}/config/sdkconfig.h")
    file(READ "${CMAKE_BINARY_DIR}/config/sdkconfig.h" config_header)
    string(REPLACE "\\n" "n" client_certificate ${config_header})
    message("CLIENT_CERT: ${client_certificate}")
    file(WRITE "${CMAKE_BINARY_DIR}/config/sdkconfig.h" "${client_certificate}")
endif()

idf_component_get_property(MBEDTLS_DIR mbedtls COMPONENT_DIR)

#list(APPEND COMPONENT_SOURCES
#    ${CMAKE_CURRENT_LIST_DIR}/backoff_algorithm.c
#    ${CMAKE_CURRENT_LIST_DIR}/transport_tls_esp32.c
#    ${CMAKE_CURRENT_LIST_DIR}/crypto_esp32.c
#)

#list(APPEND COMPONENT_SOURCES
#    backoff_algorithm.c
#    transport_tls_esp32.c
#    azure_sample_crypto.c
#)

file(GLOB COMPONENT_SOURCES
    ./*.c
)

set(COMPONENT_INCLUDE_DIRS
    include
    ${CMAKE_CURRENT_LIST_DIR}/../../azure-configs
    ${MBEDTLS_DIR}/mbedtls/include
)

message("Sample Azure IoT Component sources used: ${COMPONENT_SOURCES}")
message("Sample Azure IoT Component include dirs used: ${COMPONENT_INCLUDE_DIRS}")

if (DEFINED CONFIG_ESP_TLS_USE_SECURE_ELEMENT)
    idf_component_register(
        SRCS ${COMPONENT_SOURCES}
        INCLUDE_DIRS ${COMPONENT_INCLUDE_DIRS}
        REQUIRES mbedtls tcp_transport esp-cryptoauthlib coreMQTT azure-sdk-for-c azure)
else()
    idf_component_register(
        SRCS ${COMPONENT_SOURCES}
        INCLUDE_DIRS ${COMPONENT_INCLUDE_DIRS}
        PRIV_REQUIRES mbedtls tcp_transport coreMQTT azure-sdk-for-c azure)
endif()
azure_management CMakeLists

Code: Select all

cmake_minimum_required(VERSION 3.19)

list(APPEND component_srcs "azure_management.cpp")

#set(ROOT_PATH
#    ${CMAKE_CURRENT_LIST_DIR}/../..
#)

#set(AZURE_IOT_MIDDLEWARE_FREERTOS
#    ${ROOT_PATH}/components/azure/azure-iot-middleware-freertos
#)

#list(APPEND COMPONENT_SOURCES
#    ${AZURE_IOT_MIDDLEWARE_FREERTOS}/ports/coreMQTT/azure_iot_core_mqtt.c
#)

#idf_component_get_property(FREERTOS_DIR freertos COMPONENT_DIR)
#idf_component_get_property(FREERTOS_RELATIVE_INCLUDE_DIRS freertos INCLUDE_DIRS)

#foreach(FREERTOS_RELATIVE_INCLUDE_DIR ${FREERTOS_RELATIVE_INCLUDE_DIRS})
#    file(REAL_PATH ${FREERTOS_RELATIVE_INCLUDE_DIR} FREERTOS_ABSOLUTE_INCLUDE_DIR BASE_DIRECTORY ${FREERTOS_DIR})
#    list(APPEND FREERTOS_ABSOLUTE_INCLUDE_DIRS ${FREERTOS_ABSOLUTE_INCLUDE_DIR})

#    set(FREERTOS_ABSOLUTE_INCLUDE_FREERTOS_DIR "${FREERTOS_ABSOLUTE_INCLUDE_DIR}/freertos")
#    if(EXISTS "${FREERTOS_ABSOLUTE_INCLUDE_FREERTOS_DIR}")
#        list(APPEND FREERTOS_ABSOLUTE_INCLUDE_DIRS ${FREERTOS_ABSOLUTE_INCLUDE_FREERTOS_DIR})
#    endif()
#endforeach()

set(AZURE_MANAGEMENT_CONFIG_PATH
    ${CMAKE_CURRENT_LIST_DIR}/../../azure-configs
)

#file(GLOB AZURE_MANAGEMENT_SOURCES
#    *.cpp
#)

set(COMPONENT_SOURCES
    #${AZURE_MANAGEMENT_SOURCES}
    azure_management.cpp
)

set(COMPONENT_INCLUDE_DIRS
    include
    #${FREERTOS_ABSOLUTE_INCLUDE_DIRS}
    ${AZURE_MANAGEMENT_CONFIG_PATH}
)

idf_component_register(SRCS "${COMPONENT_SOURCES}"
                       INCLUDE_DIRS ${COMPONENT_INCLUDE_DIRS}
                       REQUIRES azure-sdk-for-c coreMQTT azure sample-azure-iot freertos
                       )
azure CMakeLists (which contains azure-iot-middleware-freertos)

Code: Select all

# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT

cmake_minimum_required(VERSION 3.19)

set(ROOT_PATH
    ${CMAKE_CURRENT_LIST_DIR}/../..
)

set(AZURE_IOT_MIDDLEWARE_FREERTOS
    ${ROOT_PATH}/components/azure/azure-iot-middleware-freertos
)

file(GLOB_RECURSE COMPONENT_SOURCES
    ${AZURE_IOT_MIDDLEWARE_FREERTOS}/source/*.c
)

list(APPEND COMPONENT_SOURCES
    ${AZURE_IOT_MIDDLEWARE_FREERTOS}/ports/coreMQTT/azure_iot_core_mqtt.c
)

idf_component_get_property(FREERTOS_DIR freertos COMPONENT_DIR)
idf_component_get_property(FREERTOS_RELATIVE_INCLUDE_DIRS freertos INCLUDE_DIRS)

foreach(FREERTOS_RELATIVE_INCLUDE_DIR ${FREERTOS_RELATIVE_INCLUDE_DIRS})
    file(REAL_PATH ${FREERTOS_RELATIVE_INCLUDE_DIR} FREERTOS_ABSOLUTE_INCLUDE_DIR BASE_DIRECTORY ${FREERTOS_DIR})
    list(APPEND FREERTOS_ABSOLUTE_INCLUDE_DIRS ${FREERTOS_ABSOLUTE_INCLUDE_DIR})

    set(FREERTOS_ABSOLUTE_INCLUDE_FREERTOS_DIR "${FREERTOS_ABSOLUTE_INCLUDE_DIR}/freertos")
    if(EXISTS "${FREERTOS_ABSOLUTE_INCLUDE_FREERTOS_DIR}")
        list(APPEND FREERTOS_ABSOLUTE_INCLUDE_DIRS ${FREERTOS_ABSOLUTE_INCLUDE_FREERTOS_DIR})
    endif()
endforeach()

set(COMPONENT_INCLUDE_DIRS
    ${FREERTOS_ABSOLUTE_INCLUDE_DIRS}
    ${AZURE_IOT_MIDDLEWARE_FREERTOS}/source/include
    ${AZURE_IOT_MIDDLEWARE_FREERTOS}/source/interface
    ${AZURE_IOT_MIDDLEWARE_FREERTOS}/ports/coreMQTT
)

idf_component_register(
    SRCS ${COMPONENT_SOURCES}
    INCLUDE_DIRS ${COMPONENT_INCLUDE_DIRS}
    REQUIRES freertos azure-sdk-for-c coreMQTT mbedtls sample-azure-iot)


Re: ESP32S3 ESP-IDF v5.2.2 Azure IoTHub support integration

Posted: Wed Aug 07, 2024 11:47 am
by dmitrij999
Finally I managed to compile my project with Azure
in sample-azure-iot, header files, I wrapped calls defined in them into

Code: Select all

#ifdef __cplusplus
extern "C" {
#endif
...
#ifdef __cplusplus
}
#endif