espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.7k stars 7.29k forks source link

BLE server throughput example compilation error (IDFGH-9597) #10946

Closed kloovt closed 8 months ago

kloovt commented 1 year ago

Answers checklist.

IDF version.

v5.01

Operating System used.

Windows

How did you build your project?

VS Code IDE

If you are using Windows, please specify command line type.

PowerShell

What is the expected behavior?

I expected a piece of example code with 0 alterations to build first time without issues. The client example builds without any issue.

What is the actual behavior?

I got a couple of compilation errors all related to line 647 in example_ble_server_throughput.c The errors complain that the Macro ESP_LOGI() from esp_log.h expects an int, but the argument provided is a uint32_t.

Steps to reproduce.

  1. install esp-idf on vscode
  2. create project from throughput server example
  3. try to build as-is

Build or installation Logs.

C:/Users/jorri/esp/esp-idf/components/log/include/esp_log.h:265:27: error: format '%d' expects argument of type 'int', but argument 7 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=] 265 | #define LOG_COLOR(COLOR) "\033[0;" COLOR "m"

More Information.

I fixed it by rewriting line 647 in example_ble_server_throughput.c

existing: ESP_LOGI(GATTS_TAG, "GATTC write Bit rate = %d Byte/s, = %d bit/s, time = %ds",

fixed: ESP_LOGI(GATTS_TAG, "GATTC write Bit rate = %" PRIu32 " Byte/s, = %" PRIu32 " bit/s, time = %ds",

esp-zhp commented 11 months ago

Is this issue still present on the latest branch?

jorgie0 commented 8 months ago

This issue is still present in the following ESP IDF esp-idf-v5.1.2-4 I am using the following configuration: Windows 11 VS Code ( ESP IDF )

Code being used: https://github.com/ESP32Tutorials/esp32-esp-idf-mqtt-bme280

My apologies for the formatting below I have copied from the output of the compilation terminal and used code formatting but there are some escape sequencies causing formatting issues.

Compilation output: `-- Found Git: C:/Espressif/tools/idf-git/2.39.2/cmd/git.exe (found version "2.39.2.windows.1") -- The C compiler identification is GNU 12.2.0 -- The CXX compiler identification is GNU 12.2.0 -- The ASM compiler identification is GNU -- Found assembler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe - 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: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git' -- Could not use 'git describe' to determine PROJECT_VER. -- Building ESP-IDF components for target esp32 -- Project sdkconfig file C:/Projects/esp32-esp-idf-mqtt-bme280-main/sdkconfig Compiler supported targets: xtensa-esp32-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 -- Found Python3: C:/Espressif/python_env/idf5.1_py3.11_env/Scripts/python.exe (found version "3.11.2") found components: Interpreter -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success -- App "BME280_MQTT" version: 1 -- Adding linker script C:/Projects/esp32-esp-idf-mqtt-bme280-main/build/esp-idf/esp_system/ld/memory.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_system/ld/esp32/sections.ld.in -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom/esp32/ld/esp32.rom.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom/esp32/ld/esp32.rom.api.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/soc/esp32/ld/esp32.peripherals.ld -- Components: app_trace app_update bme280 bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa -- Component paths: C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/app_trace C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/app_update C:/Projects/esp32-esp-idf-mqtt-bme280-main/components/bme280 C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/bootloader C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/bootloader_support C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/bt C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/cmock C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/console C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/cxx C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/efuse C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp-tls C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_adc C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_app_format C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_coex C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_common C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_eth C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_event C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_gdbstub C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_hid C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_http_client C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_http_server C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_https_ota C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_https_server C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_hw_support C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_lcd C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_local_ctrl C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_mm C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_netif C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_netif_stack C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_partition C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_phy C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_pm C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_psram C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_ringbuf C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_system C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_timer C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_wifi C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/espcoredump C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esptool_py C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/fatfs C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/freertos C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/hal C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/heap C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/http_parser C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/idf_test C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/ieee802154 C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/json C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/lwip C:/Projects/esp32-esp-idf-mqtt-bme280-main/main C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/mbedtls C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/mqtt C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/newlib C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/nvs_flash C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/openthread C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/partition_table C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/perfmon C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/protobuf-c C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/protocomm C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/pthread C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/sdmmc C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/soc C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/spi_flash C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/spiffs C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/tcp_transport C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/ulp C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/unity C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/usb C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/vfs C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/wear_levelling C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/wifi_provisioning C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/wpa_supplicant C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/xtensa -- Configuring done -- Generating done -- Build files have been written to: C:/Projects/esp32-esp-idf-mqtt-bme280-main/build

[13/903] Generating ....\partition_table\partition-table.bin Partition table binary generated. Contents:


ESP-IDF Partition Table

Name, Type, SubType, Offset, Size, Flags

nvs,data,nvs,0x9000,24K, phy_init,data,phy,0xf000,4K, factory,app,factory,0x10000,1M,


[593/903] Performing configure step for 'bootloader' -- Found Git: C:/Espressif/tools/idf-git/2.39.2/cmd/git.exe (found version "2.39.2.windows.1") -- The C compiler identification is GNU 12.2.0 -- The CXX compiler identification is GNU 12.2.0 -- The ASM compiler identification is GNU -- Found assembler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe - 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: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Building ESP-IDF components for target esp32 -- Project sdkconfig file C:/Projects/esp32-esp-idf-mqtt-bme280-main/sdkconfig Compiler supported targets: xtensa-esp32-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 C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/soc/esp32/ld/esp32.peripherals.ld -- App "bootloader" version: v5.1.2-dirty -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom/esp32/ld/esp32.rom.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom/esp32/ld/esp32.rom.api.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/bootloader/subproject/main/ld/esp32/bootloader.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld -- Components: bootloader bootloader_support efuse esp_app_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: C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/bootloader C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/bootloader_support C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/efuse C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_app_format C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_common C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_hw_support C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_system C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esptool_py C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/freertos C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/hal C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/bootloader/subproject/main C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/bootloader/subproject/components/micro-ecc C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/newlib C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/partition_table C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/soc C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/spi_flash C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/xtensa -- Configuring done -- Generating done -- Build files have been written to: C:/Projects/esp32-esp-idf-mqtt-bme280-main/build/bootloader [655/903] Performing build step for 'bootloader' [1/104] Generating project_elf_src_esp32.c [2/104] Building C object esp-idf/xtensa/CMakeFiles/idf_xtensa.dir/eri.c.obj [3/104] Building C object esp-idf/xtensa/CMakeFiles/idf_xtensa.dir/xt_trax.c.obj [4/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/uart_periph.c.obj [5/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/adc_periph.c.obj [6/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/gpio_periph.c.obj [7/104] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/lldesc.c.obj [8/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/dport_access.c.obj [9/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/pcnt_periph.c.obj [10/104] Building C object CMakeFiles/bootloader.elf.dir/project_elf_src_esp32.c.obj [11/104] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/interrupts.c.obj [12/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/rmt_periph.c.obj [13/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/dport_access_common.c.obj [14/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/ledc_periph.c.obj [15/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/sdm_periph.c.obj [16/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/spi_periph.c.obj [17/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/sdmmc_periph.c.obj [18/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/i2s_periph.c.obj [19/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/timer_periph.c.obj [20/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/twai_periph.c.obj [21/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/lcd_periph.c.obj [22/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/mcpwm_periph.c.obj [23/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/sdio_slave_periph.c.obj [24/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/i2c_periph.c.obj [25/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/dac_periph.c.obj [26/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/rtc_io_periph.c.obj [27/104] Building C object esp-idf/soc/CMakeFiles/idf_soc.dir/esp32/touch_sensor_periph.c.obj [28/104] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/esp32/cache_hal_esp32.c.obj [29/104] Building C object esp-idf/hal/CMakeFiles/idf_hal.dir/esp32/efuse_hal.c.obj [30/104] Building C object esp-idf/hal/CMakeFiles/idf_hal.dir/mmu_hal.c.obj [31/104] Building C object esp-idf/esp_app_format/CMakeFiles/idf_esp_app_format.dir/esp_app_desc.c.obj [32/104] Building C object esp-idf/hal/CMakeFiles/idf_hal.dir/efuse_hal.c.obj [33/104] Building C object esp-idf/hal/CMakeFiles/idf_hal.dir/mpu_hal.c.obj [34/104] Building C object esp-idf/spi_flash/CMakeFiles/idf_spi_flash.dir/spi_flash_wrap.c.obj [35/104] Building C object esp-idf/hal/CMakeFiles/idf_hal.dir/wdt_hal_iram.c.obj [36/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/bootloader_clock_init.c.obj [37/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/bootloader_random.c.obj [38/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/bootloader_efuse.c.obj [39/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/bootloader_mem.c.obj [40/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/bootloader_random_esp32.c.obj [41/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/bootloader_common_loader.c.obj [42/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/flash_encrypt.c.obj [43/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/bootloader_flash/src/flash_qio_mode.c.obj [44/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/secure_boot.c.obj [45/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/bootloader_common.c.obj [46/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/esp32/bootloader_soc.c.obj [47/104] Building C object esp-idf/micro-ecc/CMakeFiles/idf_micro-ecc.dir/uECC_verify_antifault.c.obj [48/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/bootloader_flash/src/bootloader_flash_config_esp32.c.obj [49/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/bootloader_panic.c.obj [50/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/bootloader_flash/src/bootloader_flash.c.obj [51/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/esp32/bootloader_sha.c.obj [52/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/flash_partitions.c.obj [53/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/esp32/bootloader_esp32.c.obj [54/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/bootloader_console_loader.c.obj [55/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/bootloader_clock_loader.c.obj [56/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/bootloader_console.c.obj [57/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/bootloader_init.c.obj [58/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/bootloader_utility.c.obj [59/104] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_table.c.obj [60/104] Building C object esp-idf/efuse/CMakeFiles/idf_efuse.dir/esp32/esp_efuse_fields.c.obj [61/104] Building C object esp-idf/efuse/CMakeFiles/idf_efuse.dir/src/esp_efuse_fields.c.obj [62/104] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/efuse_controller/keys/without_key_purposes/three_key_blocks/esp_efuse_api_key.c.obj [63/104] Building C object esp-idf/esp_hw_support/CMakeFiles/idf_esp_hw_support.dir/esp_memory_utils.c.obj [64/104] Building C object esp-idf/esp_system/CMakeFiles/idf_esp_system.dir/esp_err.c.obj [65/104] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/cpu_region_protect.c.obj [66/104] Building C object esp-idf/efuse/CMakeFiles/idf_efuse.dir/src/esp_efuse_api.c.obj [67/104] Building C object esp-idf/efuse/CMakeFiles/idf_efuse.dir/src/esp_efuse_utility.c.obj [68/104] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_utility.c.obj [69/104] Building C object esp-idf/esp_hw_support/CMakeFiles/idf_esp_hw_support.dir/cpu.c.obj [70/104] Building C object esp-idf/esp_rom/CMakeFiles/idf_esp_rom.dir/patches/esp_rom_sys.c.obj [71/104] Building C object esp-idf/esp_hw_support/CMakeFiles/idf_esp_hw_support.dir/port/esp32/chip_info.c.obj [72/104] Building C object esp-idf/bootloader_support/CMakeFiles/idf_bootloader_support.dir/src/esp_image_format.c.obj [73/104] Building C object esp-idf/esp_rom/CMakeFiles/idf_esp_rom.dir/patches/esp_rom_crc.c.obj [74/104] Building C object esp-idf/esp_hw_support/CMakeFiles/idf_esp_hw_support.dir/port/esp32/rtc_init.c.obj [75/104] Building ASM object esp-idf/esp_rom/CMakeFiles/idf_esp_rom.dir/patches/esp_rom_longjmp.S.obj [76/104] Building C object esp-idf/esp_rom/CMakeFiles/idf_esp_rom.dir/patches/esp_rom_efuse.c.obj [77/104] Building C object esp-idf/esp_rom/CMakeFiles/idf_esp_rom.dir/patches/esp_rom_uart.c.obj [78/104] Building C object esp-idf/esp_hw_support/CMakeFiles/idf_esp_hw_support.dir/port/esp32/rtc_clk_init.c.obj [79/104] Building C object esp-idf/esp_common/CMakeFiles/__idf_esp_common.dir/src/esp_err_to_name.c.obj [80/104] Building C object esp-idf/esp_hw_support/CMakeFiles/idf_esp_hw_support.dir/port/esp32/rtc_time.c.obj [81/104] Building C object esp-idf/esp_hw_support/CMakeFiles/idf_esp_hw_support.dir/port/esp32/rtc_sleep.c.obj [82/104] Building C object esp-idf/log/CMakeFiles/idf_log.dir/log_noos.c.obj [83/104] Building C object esp-idf/main/CMakeFiles/idf_main.dir/bootloader_start.c.obj [84/104] Building C object esp-idf/esp_hw_support/CMakeFiles/idf_esp_hw_support.dir/port/esp32/rtc_clk.c.obj [85/104] Building C object esp-idf/log/CMakeFiles/idf_log.dir/log.c.obj [86/104] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_buffers.c.obj [87/104] Linking C static library esp-idf\log\liblog.a [88/104] Building C object esp-idf/esp_rom/CMakeFiles/idf_esp_rom.dir/patches/esp_rom_spiflash.c.obj [89/104] Linking C static library esp-idf\esp_rom\libesp_rom.a [90/104] Linking C static library esp-idf\esp_common\libesp_common.a [91/104] Linking C static library esp-idf\esp_hw_support\libesp_hw_support.a [92/104] Linking C static library esp-idf\esp_system\libesp_system.a [93/104] Linking C static library esp-idf\efuse\libefuse.a [94/104] Linking C static library esp-idf\bootloader_support\libbootloader_support.a [95/104] Linking C static library esp-idf\esp_app_format\libesp_app_format.a [96/104] Linking C static library esp-idf\spi_flash\libspi_flash.a [97/104] Linking C static library esp-idf\hal\libhal.a [98/104] Linking C static library esp-idf\micro-ecc\libmicro-ecc.a [99/104] Linking C static library esp-idf\soc\libsoc.a [100/104] Linking C static library esp-idf\xtensa\libxtensa.a [101/104] Linking C static library esp-idf\main\libmain.a [102/104] Linking C executable bootloader.elf [103/104] Generating binary image from built executable esptool.py v4.7.0 Creating esp32 image... Merged 1 ELF section Successfully created esp32 image. Generated C:/Projects/esp32-esp-idf-mqtt-bme280-main/build/bootloader/bootloader.bin [104/104] cmd.exe /C "cd /D C:\Projects\esp32-esp-idf-mqtt-bme280-main\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Projects/esp32-esp-idf-mqtt-bme280-main/build/bootloader/bootloader.bin" Bootloader binary size 0x6770 bytes. 0x890 bytes (8%) free. [887/903] Building C object esp-idf/bme280/CMakeFiles/__idf_bme280.dir/bme280_support.c.obj C:/Projects/esp32-esp-idf-mqtt-bme280-main/components/bme280/bme280_support.c: In function 'BME280_I2C_bus_write': C:/Projects/esp32-esp-idf-mqtt-bme280-main/components/bme280/bme280_support.c:334:12: warning: variable 'array' set but not used [-Wunused-but-set-variable] 334 u8 array[I2C_BUFFER_LEN]; ^~~~~ C:/Projects/esp32-esp-idf-mqtt-bme280-main/components/bme280/bme280_support.c: In function 'BME280_SPI_bus_write': C:/Projects/esp32-esp-idf-mqtt-bme280-main/components/bme280/bme280_support.c:435:12: warning: variable 'array' set but not used [-Wunused-but-set-variable] 435 u8 array[SPI_BUFFER_LEN * BME280_ADDRESS_INDEX]; ^~~~~ [897/903] Building C object esp-idf/main/CMakeFiles/idf_main.dir/main.c.obj FAILED: esp-idf/main/CMakeFiles/idf_main.dir/main.c.obj C:\Espressif\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DESP_PLATFORM -DIDF_VER=\"v5.1.2-dirty\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DUNITY_INCLUDE_CONFIG_H -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -IC:/Projects/esp32-esp-idf-mqtt-bme280-main/build/config -IC:/Projects/esp32-esp-idf-mqtt-bme280-main/main -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/newlib/platform_include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/freertos/FreeRTOS-Kernel/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/freertos/esp_additions/include/freertos -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/freertos/esp_additions/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/freertos/esp_additions/arch/xtensa/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_hw_support/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_hw_support/include/soc -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_hw_support/include/soc/esp32 -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_hw_support/port/esp32/. -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_hw_support/port/esp32/private_include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/heap/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/soc/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/soc/esp32 -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/soc/esp32/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/hal/esp32/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/hal/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/hal/platform_port/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom/include/esp32 -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_rom/esp32 -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_common/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_system/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_system/port/soc -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_system/port/include/private -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/xtensa/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/xtensa/esp32/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/lwip/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/lwip/include/apps -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/lwip/include/apps/sntp -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/lwip/lwip/src/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/lwip/port/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/lwip/port/freertos/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/lwip/port/esp32xx/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/lwip/port/esp32xx/include/arch -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_ringbuf/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/efuse/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/efuse/esp32/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/deprecated -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/analog_comparator/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/dac/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/gpio/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/gptimer/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/i2c/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/i2s/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/ledc/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/mcpwm/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/parlio/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/pcnt/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/rmt/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/sdio_slave/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/sdmmc/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/sigma_delta/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/spi/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/temperature_sensor/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/touch_sensor/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/twai/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/uart/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/usb_serial_jtag/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/driver/touch_sensor/esp32/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_pm/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/mbedtls/port/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/mbedtls/mbedtls/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/mbedtls/mbedtls/library -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/mbedtls/esp_crt_bundle/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/mbedtls/mbedtls/3rdparty/everest/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/mbedtls/mbedtls/3rdparty/p256-m -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/mbedtls/mbedtls/3rdparty/p256-m/p256-m -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_app_format/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/bootloader_support/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/bootloader_support/bootloader_flash/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_partition/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/app_update/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_mm/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/spi_flash/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/pthread/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_timer/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/app_trace/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_event/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/nvs_flash/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_phy/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_phy/esp32/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/vfs/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_netif/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/wpa_supplicant/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/wpa_supplicant/port/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/wpa_supplicant/esp_supplicant/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_coex/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_wifi/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_wifi/wifi_apps/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/unity/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/unity/unity/src -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/cmock/CMock/src -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/console -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/http_parser -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp-tls -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp-tls/esp-tls-crypto -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_adc/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_adc/interface -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_adc/esp32/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_adc/deprecated/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_eth/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_gdbstub/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_hid/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/tcp_transport/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_http_client/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_http_server/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_https_ota/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_psram/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_lcd/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_lcd/interface -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/protobuf-c/protobuf-c -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/protocomm/include/common -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/protocomm/include/security -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/protocomm/include/transports -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_local_ctrl/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/espcoredump/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/espcoredump/include/port/xtensa -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/wear_levelling/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/sdmmc/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/fatfs/diskio -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/fatfs/vfs -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/fatfs/src -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/idf_test/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/idf_test/include/esp32 -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/ieee802154/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/json/cJSON -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/mqtt/esp-mqtt/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/perfmon/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/spiffs/include -IC:/Espressif/frameworks/esp-idf-v5.1.2-4/components/wifi_provisioning/include -IC:/Projects/esp32-esp-idf-mqtt-bme280-main/components/bme280/include -mlongcalls -Wno-frame-address -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 -fmacro-prefix-map=C:/Projects/esp32-esp-idf-mqtt-bme280-main=. -fmacro-prefix-map=C:/Espressif/frameworks/esp-idf-v5.1.2-4=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/main/CMakeFiles/idf_main.dir/main.c.obj -MF esp-idf\main\CMakeFiles__idf_main.dir\main.c.obj.d -o esp-idf/main/CMakeFiles/idf_main.dir/main.c.obj -c C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c
C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c: In function 'wifi_init': C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c:171:62: warning: passing argument 3 of 'esp_event_handler_register' from incompatible pointer type [-Wincompatible-pointer-types] 171
esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &wifi_event_handler, NULL); ^~~~~~~
esp_err_t ()(void , const char , int32_t, void ) {aka int ()(void , const char , long int, void )}
In file included from C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_wifi/include/esp_wifi.h:56, from C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c:5: C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_event/include/esp_event.h:139:58: note: expected 'esp_event_handler_t' {aka 'void ()(void , const char , long int, void )'} but argument is of type 'esp_err_t ()(void , const char , int32_t, void )' {aka 'int ()(void , const char , long int, void )'} 139 esp_event_handler_t event_handler, ~~~~^~~~~ C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c:172:63: warning: passing argument 3 of 'esp_event_handler_register' from incompatible pointer type [-Wincompatible-pointer-types] 172 esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &wifi_event_handler, NULL); ^~~~~~~
esp_err_t ()(void , const char , int32_t, void ) {aka int ()(void , const char , long int, void )}

C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/esp_event/include/esp_event.h:139:58: note: expected 'esp_event_handler_t' {aka 'void ()(void , const char , long int, void )'} but argument is of type 'esp_err_t ()(void , const char , int32_t, void )' {aka 'int ()(void , const char , long int, void )'} 139 | esp_event_handler_t event_handler, | ~~~~^~~~~ In file included from C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c:21: C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c: In function 'mqtt_event_handler': C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:265:27: error: format '%d' expects argument of type 'int', but argument 7 has type 'int32_t' {aka 'long in '} [-Werror=format=] 265 | #define LOG_COLOR(COLOR) "\033[0;" COLOR "m" | ^~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:268:27: note: in expansion of macro 'LOG_COLOR' 268 | #define LOG_COLOR_E LOG_COLOR(LOG_COLOR_RED) | ^~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:282:37: note: in expansion of macro 'LOG_COLOR_E' 282 | #define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:410:86: note: in expansion of macro 'LOG_FORMAT' 410 | if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##VA_ARGS__); } \ | ^~~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:432:41: note: in expansion of macro 'ESP_LOG_LEVEL' 432 | if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##VA_ARGS); \ | ^~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:343:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 343 | #define ESP_LOGD( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_DEBUG, tag, format, ##VA_ARGS) | ^~~~~~~ C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c:202:5: note: in expansion of macro 'ESP_LOGD' 202 | ESP_LOGD(TAG, "Event dispatched from event loop base=%s, event_id=%d", base, event_id); | ^~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:265:27: error: format '%d' expects argument of type 'int', but argument 7 has type 'int32_t' {aka 'long in '} [-Werror=format=] 265 | #define LOG_COLOR(COLOR) "\033[0;" COLOR "m" | ^~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:269:27: note: in expansion of macro 'LOG_COLOR' 269 | #define LOG_COLOR_W LOG_COLOR(LOG_COLOR_BROWN) | ^~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:282:37: note: in expansion of macro 'LOG_COLOR_W' 282 | #define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:411:86: note: in expansion of macro 'LOG_FORMAT' 411 | else if (level==ESP_LOG_WARN ) { esp_log_write(ESP_LOG_WARN, tag, LOG_FORMAT(W, format), esp_log_timestamp(), tag, ##__VA_ARGS); } \ | ^~~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:432:41: note: in expansion of macro 'ESP_LOG_LEVEL' 432 | if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##VA_ARGS); \ | ^~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:343:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 343 | #define ESP_LOGD( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_DEBUG, tag, format, ##VA_ARGS) | ^~~~~~~ C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c:202:5: note: in expansion of macro 'ESP_LOGD' 202 | ESP_LOGD(TAG, "Event dispatched from event loop base=%s, event_id=%d", base, event_id); | ^~~~ C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c:202:1: error: format '%d' expects argument of type 'int', but argument 7 has type 'int32_t' {aka 'long int'} [-Werror=format=] 202 | ESP_LOGD(TAG, "Event dispatched from event loop base=%s, event_id=%d", base, event_id); | ^ ~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:282:59: note: in definition of macro 'LOG_FORMAT' 282 | #define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:432:41: note: in expansion of macro 'ESP_LOG_LEVEL' 432 | if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##VA_ARGS); \ | ^~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:343:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 343 | #define ESP_LOGD( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_DEBUG, tag, format, ##VA_ARGS) | ^~~~~~~ C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c:202:5: note: in expansion of macro 'ESP_LOGD' 202 | ESP_LOGD(TAG, "Event dispatched from event loop base=%s, event_id=%d", base, event_id); | ^~~~ C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c:202:1: error: format '%d' expects argument of type 'int', but argument 7 has type 'int32_t' {aka 'long int'} [-Werror=format=] 202 | ESP_LOGD(TAG, "Event dispatched from event loop base=%s, event_id=%d", base, event_id); | ^ ~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:282:59: note: in definition of macro 'LOG_FORMAT' 282 | #define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:432:41: note: in expansion of macro 'ESP_LOG_LEVEL' 432 | if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##VA_ARGS); \ | ^~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:343:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 343 | #define ESP_LOGD( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_DEBUG, tag, format, ##VA_ARGS) | ^~~~~~~ C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c:202:5: note: in expansion of macro 'ESP_LOGD' 202 | ESP_LOGD(TAG, "Event dispatched from event loop base=%s, event_id=%d", base, event_id); | ^~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:265:27: error: format '%d' expects argument of type 'int', but argument 7 has type 'int32_t' {aka 'long in '} [-Werror=format=] 265 | #define LOG_COLOR(COLOR) "\033[0;" COLOR "m" | ^~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:270:27: note: in expansion of macro 'LOG_COLOR' 270 | #define LOG_COLOR_I LOG_COLOR(LOG_COLOR_GREEN) | ^~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:282:37: note: in expansion of macro 'LOG_COLOR_I' 282 | #define LOG_FORMAT(letter, format) LOGCOLOR ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" | ^~~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:414:86: note: in expansion of macro 'LOG_FORMAT' 414 | else { esp_log_write(ESP_LOG_INFO, tag, LOG_FORMAT(I, format), esp_log_timestamp(), tag, ##VA_ARGS__); } \ | ^~~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:432:41: note: in expansion of macro 'ESP_LOG_LEVEL' 432 | if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##VA_ARGS); \ | ^~~~~ C:/Espressif/frameworks/esp-idf-v5.1.2-4/components/log/include/esp_log.h:343:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL' 343 | #define ESP_LOGD( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_DEBUG, tag, format, ##VA_ARGS__) | ^~~~~~~ C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c:202:5: note: in expansion of macro 'ESP_LOGD' 202 | ESP_LOGD(TAG, "Event dispatched from event loop base=%s, event_id=%d", base, event_id); | ^~~~ C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c:205:9: warning: unused variable 'msg_id' [-Wunused-variable] 205 | int msg_id; | ^~ C:/Projects/esp32-esp-idf-mqtt-bme280-main/main/main.c:204:30: warning: unused variable 'client' [-Wunused-variable] 204 | esp_mqtt_client_handle_t client = event->client; | ^~ cc1.exe: some warnings being treated as errors ninja: build stopped: subcommand failed.

esp-zhp commented 8 months ago

@jorgie0 Hi,thanks for report the issue, I build throughput_server example using v5.1.2,and build success:

~/esp/esp-idf/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server$ idf.py build Executing action: all (aliases: build) Running ninja in directory /home/zhanghaipeng/esp/esp-idf/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/build Executing "ninja all"... [1/4] cd /home/zhanghaipeng/esp/esp-idf/examples/bluetooth/b...hroughput/throughput_server/build/throughput_server_demo.binthroughput_server_demo.bin binary size 0xbfb70 bytes. Smallest app partition is 0x100000 bytes. 0x40490 bytes (25%) free. [1/1] cd /home/zhanghaipeng/esp/esp-idf/examples/bluetooth/b...throughput/throughput_server/build/bootloader/bootloader.binBootloader binary size 0x6820 bytes. 0x7e0 bytes (7%) free.

Project build complete. To flash, run this command: /home/zhanghaipeng/.espressif/python_env/idf5.1_py3.11_env/bin/python ../../../../../../components/esptool_py/esptool/esptool.py -p (PORT) -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size 2MB --flash_freq 40m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/throughput_server_demo.bin or run 'idf.py -p (PORT) flash' ~/esp/esp-idf/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server$ git log commit 482a8fb2d78e3b58eb21b26da8a5bedf90623213 (HEAD, tag: v5.1.2, origin/test_esp32c6/v5.1.2, origin/test/coex_test_v5.1.2_20231113_karl) Author: Aditya Patwardhan aditya.patwardhan@espressif.com Date: Fri Nov 10 08:08:53 2023 +0550

change(version): Update version to 5.1.2
esp-cjh commented 8 months ago

@jorgie0 The compilation error you report was caused by the code of the esp32-esp-idf-mqtt-bme280 example. We found no compilation errors in the BLE server throughput example.

Alvin1Zhang commented 8 months ago

Thanks for reporting, feel free to reopen.