ESP-IDF build error in vscode

Darkalles
Posts: 4
Joined: Thu Sep 15, 2022 12:35 am

ESP-IDF build error in vscode

Postby Darkalles » Sat Sep 17, 2022 8:05 pm

I create new project in ESP-IDF extension of vscode
Image
And I choose template-app. And I write this code :

Code: Select all

#include <freertos/FreeRTOS.h>
#include <freertos/task.h>

#include "nvs_flash.h"
#include "esp_err.h"
#include "esp_log.h"

#include "esp_bt.h"
#include "esp_bt_main.h"
#include "esp_gap_ble_api.h"

static esp_ble_adv_params_t ble_adv_params = {
	
	.adv_int_min = 0x20,
	.adv_int_max = 0x40,
	.adv_type = ADV_TYPE_NONCONN_IND,
	.own_addr_type  = BLE_ADDR_TYPE_PUBLIC,
	.channel_map = ADV_CHNL_ALL,
	.adv_filter_policy  = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY,
};

static esp_ble_adv_data_t adv_data = {
	
	.include_name = true,
	.flag = ESP_BLE_ADV_FLAG_LIMIT_DISC | ESP_BLE_ADV_FLAG_BREDR_NOT_SPT,
	.appearance = 384,
};

// GAP callback
static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
{
    switch (event) {
		
		case ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT: 
				
			printf("ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT\n");
			esp_ble_gap_start_advertising(&ble_adv_params);
			break;		
		
		case ESP_GAP_BLE_ADV_START_COMPLETE_EVT:
			
			printf("ESP_GAP_BLE_ADV_START_COMPLETE_EVT\n");
			if(param->adv_start_cmpl.status == ESP_BT_STATUS_SUCCESS) {
				printf("Advertising started\n\n");
			}
			else printf("Unable to start advertising process, error code %d\n\n", param->scan_start_cmpl.status);
			break;
	
		default:
		
			printf("Event %d unhandled\n\n", event);
			break;
	}
}


void app_main() {
	
	printf("BT broadcast\n\n");
	
	// set components to log only errors
	esp_log_level_set("*", ESP_LOG_ERROR);
	
	// initialize nvs
	ESP_ERROR_CHECK(nvs_flash_init());
	printf("- NVS init ok\n");
	
	// release memory reserved for classic BT (not used)
	ESP_ERROR_CHECK(esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT));
	printf("- Memory for classic BT released\n");
	
	// initialize the BT controller with the default config
	esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
    esp_bt_controller_init(&bt_cfg);            // esp_bt.h
	printf("- BT controller init ok\n");
	
	// enable the BT controller in BLE mode
    esp_bt_controller_enable(ESP_BT_MODE_BLE);  // esp_bt.h
	printf("- BT controller enabled in BLE mode\n");
	
	// initialize Bluedroid library
	esp_bluedroid_init();
    esp_bluedroid_enable();
	printf("- Bluedroid initialized and enabled\n");
	
	// register GAP callback function
	ESP_ERROR_CHECK(esp_ble_gap_register_callback(esp_gap_cb));
	printf("- GAP callback registered\n\n");
	
	// configure the adv data
	ESP_ERROR_CHECK(esp_ble_gap_set_device_name("Sport_Device"));
	ESP_ERROR_CHECK(esp_ble_gap_config_adv_data(&adv_data));
	printf("- ADV data configured\n\n");
}
Finally, I try to build project but I have this issue : Image
How can I solve this problem? Thanks

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP-IDF build error in vscode

Postby ESP_igrr » Sun Sep 18, 2022 9:21 pm

Hi Darkalles,

Could you please post the full build log? The actual error should be printed by CMake above the "call stack".

Also, could you please post the contents of main/CMakeLists.txt file of your project, and mention which version of ESP-IDF you are using?

Darkalles
Posts: 4
Joined: Thu Sep 15, 2022 12:35 am

Re: ESP-IDF build error in vscode

Postby Darkalles » Mon Sep 19, 2022 3:20 pm

Full build log :

Code: Select all

 *  Executing task: cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 .. 

-- Found Git: C:/Espressif/tools/idf-git/2.30.1/cmd/git.exe (found version "2.30.1.windows.1") 
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/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-2021r2-patch3-8.4.0/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-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file C:/Users/Bilaltan/Desktop/esp32_projects/first_project/sdkconfig
-- Found Python3: C:/Espressif/python_env/idf4.4_py3.8_env/Scripts/python.exe (found version "3.8.7") found components: Interpreter 
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "first_project" version: 1
-- Adding linker script C:/Users/Bilaltan/Desktop/esp32_projects/first_project/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_system/ld/esp32/sections.ld.in
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- Components: app_trace app_update asio bootloader bootloader_support bt cbor cmock coap console cxx driver efuse esp-tls esp32 esp_adc_cal 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_ipc esp_lcd esp_local_ctrl esp_netif esp_phy esp_pm esp_ringbuf esp_rom esp_serial_slave_link esp_system esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos hal heap idf_test ieee802154 jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter tinyusb ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: C:/Users/Bilaltan/esp/esp-idf/components/app_trace C:/Users/Bilaltan/esp/esp-idf/components/app_update C:/Users/Bilaltan/esp/esp-idf/components/asio C:/Users/Bilaltan/esp/esp-idf/components/bootloader C:/Users/Bilaltan/esp/esp-idf/components/bootloader_support C:/Users/Bilaltan/esp/esp-idf/components/bt C:/Users/Bilaltan/esp/esp-idf/components/cbor C:/Users/Bilaltan/esp/esp-idf/components/cmock C:/Users/Bilaltan/esp/esp-idf/components/coap C:/Users/Bilaltan/esp/esp-idf/components/console C:/Users/Bilaltan/esp/esp-idf/components/cxx C:/Users/Bilaltan/esp/esp-idf/components/driver C:/Users/Bilaltan/esp/esp-idf/components/efuse C:/Users/Bilaltan/esp/esp-idf/components/esp-tls C:/Users/Bilaltan/esp/esp-idf/components/esp32 C:/Users/Bilaltan/esp/esp-idf/components/esp_adc_cal C:/Users/Bilaltan/esp/esp-idf/components/esp_common C:/Users/Bilaltan/esp/esp-idf/components/esp_eth C:/Users/Bilaltan/esp/esp-idf/components/esp_event C:/Users/Bilaltan/esp/esp-idf/components/esp_gdbstub C:/Users/Bilaltan/esp/esp-idf/components/esp_hid C:/Users/Bilaltan/esp/esp-idf/components/esp_http_client C:/Users/Bilaltan/esp/esp-idf/components/esp_http_server C:/Users/Bilaltan/esp/esp-idf/components/esp_https_ota C:/Users/Bilaltan/esp/esp-idf/components/esp_https_server C:/Users/Bilaltan/esp/esp-idf/components/esp_hw_support C:/Users/Bilaltan/esp/esp-idf/components/esp_ipc C:/Users/Bilaltan/esp/esp-idf/components/esp_lcd C:/Users/Bilaltan/esp/esp-idf/components/esp_local_ctrl C:/Users/Bilaltan/esp/esp-idf/components/esp_netif C:/Users/Bilaltan/esp/esp-idf/components/esp_phy C:/Users/Bilaltan/esp/esp-idf/components/esp_pm C:/Users/Bilaltan/esp/esp-idf/components/esp_ringbuf C:/Users/Bilaltan/esp/esp-idf/components/esp_rom C:/Users/Bilaltan/esp/esp-idf/components/esp_serial_slave_link C:/Users/Bilaltan/esp/esp-idf/components/esp_system C:/Users/Bilaltan/esp/esp-idf/components/esp_timer C:/Users/Bilaltan/esp/esp-idf/components/esp_websocket_client C:/Users/Bilaltan/esp/esp-idf/components/esp_wifi C:/Users/Bilaltan/esp/esp-idf/components/espcoredump C:/Users/Bilaltan/esp/esp-idf/components/esptool_py C:/Users/Bilaltan/esp/esp-idf/components/expat C:/Users/Bilaltan/esp/esp-idf/components/fatfs C:/Users/Bilaltan/esp/esp-idf/components/freemodbus C:/Users/Bilaltan/esp/esp-idf/components/freertos C:/Users/Bilaltan/esp/esp-idf/components/hal C:/Users/Bilaltan/esp/esp-idf/components/heap C:/Users/Bilaltan/esp/esp-idf/components/idf_test C:/Users/Bilaltan/esp/esp-idf/components/ieee802154 C:/Users/Bilaltan/esp/esp-idf/components/jsmn C:/Users/Bilaltan/esp/esp-idf/components/json C:/Users/Bilaltan/esp/esp-idf/components/libsodium C:/Users/Bilaltan/esp/esp-idf/components/log C:/Users/Bilaltan/esp/esp-idf/components/lwip C:/Users/Bilaltan/Desktop/esp32_projects/first_project/main C:/Users/Bilaltan/esp/esp-idf/components/mbedtls C:/Users/Bilaltan/esp/esp-idf/components/mdns C:/Users/Bilaltan/esp/esp-idf/components/mqtt C:/Users/Bilaltan/esp/esp-idf/components/newlib C:/Users/Bilaltan/esp/esp-idf/components/nghttp C:/Users/Bilaltan/esp/esp-idf/components/nvs_flash C:/Users/Bilaltan/esp/esp-idf/components/openssl C:/Users/Bilaltan/esp/esp-idf/components/openthread C:/Users/Bilaltan/esp/esp-idf/components/partition_table C:/Users/Bilaltan/esp/esp-idf/components/perfmon C:/Users/Bilaltan/esp/esp-idf/components/protobuf-c C:/Users/Bilaltan/esp/esp-idf/components/protocomm C:/Users/Bilaltan/esp/esp-idf/components/pthread C:/Users/Bilaltan/esp/esp-idf/components/sdmmc C:/Users/Bilaltan/esp/esp-idf/components/soc C:/Users/Bilaltan/esp/esp-idf/components/spi_flash C:/Users/Bilaltan/esp/esp-idf/components/spiffs C:/Users/Bilaltan/esp/esp-idf/components/tcp_transport C:/Users/Bilaltan/esp/esp-idf/components/tcpip_adapter C:/Users/Bilaltan/esp/esp-idf/components/tinyusb C:/Users/Bilaltan/esp/esp-idf/components/ulp C:/Users/Bilaltan/esp/esp-idf/components/unity C:/Users/Bilaltan/esp/esp-idf/components/usb C:/Users/Bilaltan/esp/esp-idf/components/vfs C:/Users/Bilaltan/esp/esp-idf/components/wear_levelling C:/Users/Bilaltan/esp/esp-idf/components/wifi_provisioning C:/Users/Bilaltan/esp/esp-idf/components/wpa_supplicant C:/Users/Bilaltan/esp/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Bilaltan/Desktop/esp32_projects/first_project/build

 *  Executing task: cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 .. 

[16/1033] 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,
*******************************************************************************
[575/1033] Performing configure step for 'bootloader'
-- Found Git: C:/Espressif/tools/idf-git/2.30.1/cmd/git.exe (found version "2.30.1.windows.1")
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/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-2021r2-patch3-8.4.0/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-2021r2-patch3-8.4.0/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:/Users/Bilaltan/Desktop/esp32_projects/first_project/sdkconfig
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp32 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:/Users/Bilaltan/esp/esp-idf/components/bootloader C:/Users/Bilaltan/esp/esp-idf/components/bootloader_support C:/Users/Bilaltan/esp/esp-idf/components/efuse C:/Users/Bilaltan/esp/esp-idf/components/esp32 C:/Users/Bilaltan/esp/esp-idf/components/esp_common C:/Users/Bilaltan/esp/esp-idf/components/esp_hw_support C:/Users/Bilaltan/esp/esp-idf/components/esp_rom C:/Users/Bilaltan/esp/esp-idf/components/esp_system C:/Users/Bilaltan/esp/esp-idf/components/esptool_py C:/Users/Bilaltan/esp/esp-idf/components/freertos C:/Users/Bilaltan/esp/esp-idf/components/hal C:/Users/Bilaltan/esp/esp-idf/components/log C:/Users/Bilaltan/esp/esp-idf/components/bootloader/subproject/main C:/Users/Bilaltan/esp/esp-idf/components/bootloader/subproject/components/micro-ecc C:/Users/Bilaltan/esp/esp-idf/components/newlib C:/Users/Bilaltan/esp/esp-idf/components/partition_table C:/Users/Bilaltan/esp/esp-idf/components/soc C:/Users/Bilaltan/esp/esp-idf/components/spi_flash C:/Users/Bilaltan/esp/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Bilaltan/Desktop/esp32_projects/first_project/build/bootloader
[642/1033] Performing build step for 'bootloader'
[1/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/soc_include_legacy_warn.c.obj
[2/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/dac_periph.c.obj
[3/97] Generating project_elf_src_esp32.c
[4/97] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/mpu_hal.c.obj
[5/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/lldesc.c.obj
[6/97] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/cpu_hal.c.obj
[7/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/adc_periph.c.obj
[8/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/gpio_periph.c.obj
[9/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/interrupts.c.obj
[10/97] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/wdt_hal_iram.c.obj
[11/97] Building C object CMakeFiles/bootloader.elf.dir/project_elf_src_esp32.c.obj
[12/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/i2s_periph.c.obj
[13/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/i2c_periph.c.obj
[14/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sdmmc_periph.c.obj
[15/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rmt_periph.c.obj
[16/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/ledc_periph.c.obj
[17/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/mcpwm_periph.c.obj
[18/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rtc_io_periph.c.obj
[19/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/lcd_periph.c.obj
[20/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/pcnt_periph.c.obj
[21/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sigmadelta_periph.c.obj
[22/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/uart_periph.c.obj
[23/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/spi_periph.c.obj
[24/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/timer_periph.c.obj
[25/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sdio_slave_periph.c.obj
[26/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/touch_sensor_periph.c.obj
[27/97] Building C object esp-idf/spi_flash/CMakeFiles/__idf_spi_flash.dir/esp32/spi_flash_rom_patch.c.obj
[28/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common_loader.c.obj
[29/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common.c.obj
[30/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_init.c.obj
[31/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_flash.c.obj
[32/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_mem.c.obj
[33/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random.c.obj
[34/97] Building C object esp-idf/micro-ecc/CMakeFiles/__idf_micro-ecc.dir/uECC_verify_antifault.c.obj
[35/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_loader.c.obj
[36/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random_esp32.c.obj
[37/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_panic.c.obj
[38/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console_loader.c.obj
[39/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_utility.c.obj
[40/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp_image_format.c.obj
[41/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_partitions.c.obj
[42/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_init.c.obj
[43/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console.c.obj
[44/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_encrypt.c.obj
[45/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/secure_boot.c.obj
[46/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_efuse_esp32.c.obj
[47/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_qio_mode.c.obj
[48/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_api.c.obj
[49/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_flash_config_esp32.c.obj
[50/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_fields.c.obj
[51/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_utility.c.obj
[52/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_fields.c.obj
[53/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_soc.c.obj
[54/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_api_key_esp32.c.obj
[55/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_utility.c.obj
[56/97] Building C object esp-idf/esp_system/CMakeFiles/__idf_esp_system.dir/esp_err.c.obj
[57/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_sha.c.obj
[58/97] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_crc.c.obj
[59/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/compare_set.c.obj
[60/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_table.c.obj
[61/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/cpu_util.c.obj
[62/97] Building C object esp-idf/esp_common/CMakeFiles/__idf_esp_common.dir/src/esp_err_to_name.c.obj
[63/97] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_sys.c.obj
[64/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_esp32.c.obj
[65/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_pm.c.obj
[66/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_init.c.obj
[67/97] Building C object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/eri.c.obj
[68/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/chip_info.c.obj
[69/97] Building ASM object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_longjmp.S.obj
[70/97] Building C object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/xt_trax.c.obj
[71/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_wdt.c.obj
[72/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_sleep.c.obj
[73/97] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_uart.c.obj
[74/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_time.c.obj
[75/97] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_tjpgd.c.obj
[76/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_clk_init.c.obj
[77/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_clk.c.obj
[78/97] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_noos.c.obj
[79/97] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/bootloader_start.c.obj
[80/97] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log.c.obj
[81/97] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_buffers.c.obj
[82/97] Linking C static library esp-idf\log\liblog.a
[83/97] Linking C static library esp-idf\esp_rom\libesp_rom.a
[84/97] Linking C static library esp-idf\esp_common\libesp_common.a
[85/97] Linking C static library esp-idf\xtensa\libxtensa.a
[86/97] Linking C static library esp-idf\esp_hw_support\libesp_hw_support.a
[87/97] Linking C static library esp-idf\esp_system\libesp_system.a
[88/97] Linking C static library esp-idf\efuse\libefuse.a
[89/97] Linking C static library esp-idf\bootloader_support\libbootloader_support.a
[90/97] Linking C static library esp-idf\spi_flash\libspi_flash.a
[91/97] Linking C static library esp-idf\micro-ecc\libmicro-ecc.a
[92/97] Linking C static library esp-idf\soc\libsoc.a
[93/97] Linking C static library esp-idf\hal\libhal.a
[94/97] Linking C static library esp-idf\main\libmain.a
[95/97] Linking C executable bootloader.elf
[96/97] Generating binary image from built executable
esptool.py v3.3.2-dev
Creating esp32 image...
Merged 1 ELF section
Successfully created esp32 image.
Generated C:/Users/Bilaltan/Desktop/esp32_projects/first_project/build/bootloader/bootloader.bin
[97/97] cmd.exe /C "cd /D C:\Users\Bilaltan\Desktop\esp32_projects\first_project\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/Users/Bilaltan/esp/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Users/Bilaltan/Desktop/esp32_projects/first_project/build/bootloader/bootloader.bin"
Bootloader binary size 0x6330 bytes. 0xcd0 bytes (11%) free.
[1025/1033] 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-2021r2-patch3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -IC:/Users/Bilaltan/Desktop/esp32_projects/first_project/build/config -IC:/Users/Bilaltan/Desktop/esp32_projects/first_project/main -IC:/Users/Bilaltan/esp/esp-idf/components/newlib/platform_include -IC:/Users/Bilaltan/esp/esp-idf/components/freertos/include -IC:/Users/Bilaltan/esp/esp-idf/components/freertos/include/esp_additions/freertos -IC:/Users/Bilaltan/esp/esp-idf/components/freertos/port/xtensa/include -IC:/Users/Bilaltan/esp/esp-idf/components/freertos/include/esp_additions -IC:/Users/Bilaltan/esp/esp-idf/components/esp_hw_support/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_hw_support/include/soc -IC:/Users/Bilaltan/esp/esp-idf/components/esp_hw_support/include/soc/esp32 -IC:/Users/Bilaltan/esp/esp-idf/components/esp_hw_support/port/esp32/. -IC:/Users/Bilaltan/esp/esp-idf/components/esp_hw_support/port/esp32/private_include -IC:/Users/Bilaltan/esp/esp-idf/components/heap/include -IC:/Users/Bilaltan/esp/esp-idf/components/log/include -IC:/Users/Bilaltan/esp/esp-idf/components/lwip/include/apps -IC:/Users/Bilaltan/esp/esp-idf/components/lwip/include/apps/sntp -IC:/Users/Bilaltan/esp/esp-idf/components/lwip/lwip/src/include -IC:/Users/Bilaltan/esp/esp-idf/components/lwip/port/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/lwip/port/esp32/include/arch -IC:/Users/Bilaltan/esp/esp-idf/components/soc/include -IC:/Users/Bilaltan/esp/esp-idf/components/soc/esp32/. -IC:/Users/Bilaltan/esp/esp-idf/components/soc/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/hal/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/hal/include -IC:/Users/Bilaltan/esp/esp-idf/components/hal/platform_port/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_rom/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_rom/include/esp32 -IC:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32 -IC:/Users/Bilaltan/esp/esp-idf/components/esp_common/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_system/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_system/port/soc -IC:/Users/Bilaltan/esp/esp-idf/components/esp_system/port/public_compat -IC:/Users/Bilaltan/esp/esp-idf/components/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/xtensa/include -IC:/Users/Bilaltan/esp/esp-idf/components/xtensa/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/driver/include -IC:/Users/Bilaltan/esp/esp-idf/components/driver/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_pm/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_ringbuf/include -IC:/Users/Bilaltan/esp/esp-idf/components/efuse/include -IC:/Users/Bilaltan/esp/esp-idf/components/efuse/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/vfs/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_wifi/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_event/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_netif/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_eth/include -IC:/Users/Bilaltan/esp/esp-idf/components/tcpip_adapter/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_phy/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_phy/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_ipc/include -IC:/Users/Bilaltan/esp/esp-idf/components/app_trace/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_timer/include -IC:/Users/Bilaltan/esp/esp-idf/components/mbedtls/port/include -IC:/Users/Bilaltan/esp/esp-idf/components/mbedtls/mbedtls/include -IC:/Users/Bilaltan/esp/esp-idf/components/mbedtls/esp_crt_bundle/include -IC:/Users/Bilaltan/esp/esp-idf/components/app_update/include -IC:/Users/Bilaltan/esp/esp-idf/components/spi_flash/include -IC:/Users/Bilaltan/esp/esp-idf/components/bootloader_support/include -IC:/Users/Bilaltan/esp/esp-idf/components/nvs_flash/include -IC:/Users/Bilaltan/esp/esp-idf/components/pthread/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_gdbstub/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_gdbstub/xtensa -IC:/Users/Bilaltan/esp/esp-idf/components/esp_gdbstub/esp32 -IC:/Users/Bilaltan/esp/esp-idf/components/espcoredump/include -IC:/Users/Bilaltan/esp/esp-idf/components/espcoredump/include/port/xtensa -IC:/Users/Bilaltan/esp/esp-idf/components/wpa_supplicant/include -IC:/Users/Bilaltan/esp/esp-idf/components/wpa_supplicant/port/include -IC:/Users/Bilaltan/esp/esp-idf/components/wpa_supplicant/esp_supplicant/include -IC:/Users/Bilaltan/esp/esp-idf/components/ieee802154/include -IC:/Users/Bilaltan/esp/esp-idf/components/console -IC:/Users/Bilaltan/esp/esp-idf/components/asio/asio/asio/include -IC:/Users/Bilaltan/esp/esp-idf/components/asio/port/include -IC:/Users/Bilaltan/esp/esp-idf/components/cbor/port/include -IC:/Users/Bilaltan/esp/esp-idf/components/unity/include -IC:/Users/Bilaltan/esp/esp-idf/components/unity/unity/src -IC:/Users/Bilaltan/esp/esp-idf/components/cmock/CMock/src -IC:/Users/Bilaltan/esp/esp-idf/components/coap/port/include -IC:/Users/Bilaltan/esp/esp-idf/components/coap/libcoap/include -IC:/Users/Bilaltan/esp/esp-idf/components/nghttp/port/include -IC:/Users/Bilaltan/esp/esp-idf/components/nghttp/nghttp2/lib/includes -IC:/Users/Bilaltan/esp/esp-idf/components/esp-tls -IC:/Users/Bilaltan/esp/esp-idf/components/esp-tls/esp-tls-crypto -IC:/Users/Bilaltan/esp/esp-idf/components/esp_adc_cal/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_hid/include -IC:/Users/Bilaltan/esp/esp-idf/components/tcp_transport/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_http_client/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_http_server/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_https_ota/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_lcd/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_lcd/interface -IC:/Users/Bilaltan/esp/esp-idf/components/protobuf-c/protobuf-c -IC:/Users/Bilaltan/esp/esp-idf/components/protocomm/include/common -IC:/Users/Bilaltan/esp/esp-idf/components/protocomm/include/security -IC:/Users/Bilaltan/esp/esp-idf/components/protocomm/include/transports -IC:/Users/Bilaltan/esp/esp-idf/components/mdns/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_local_ctrl/include -IC:/Users/Bilaltan/esp/esp-idf/components/sdmmc/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_serial_slave_link/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_websocket_client/include -IC:/Users/Bilaltan/esp/esp-idf/components/expat/expat/expat/lib -IC:/Users/Bilaltan/esp/esp-idf/components/expat/port/include -IC:/Users/Bilaltan/esp/esp-idf/components/wear_levelling/include -IC:/Users/Bilaltan/esp/esp-idf/components/fatfs/diskio -IC:/Users/Bilaltan/esp/esp-idf/components/fatfs/vfs -IC:/Users/Bilaltan/esp/esp-idf/components/fatfs/src -IC:/Users/Bilaltan/esp/esp-idf/components/freemodbus/common/include -IC:/Users/Bilaltan/esp/esp-idf/components/idf_test/include -IC:/Users/Bilaltan/esp/esp-idf/components/idf_test/include/esp32 -IC:/Users/Bilaltan/esp/esp-idf/components/jsmn/include -IC:/Users/Bilaltan/esp/esp-idf/components/json/cJSON -IC:/Users/Bilaltan/esp/esp-idf/components/libsodium/libsodium/src/libsodium/include -IC:/Users/Bilaltan/esp/esp-idf/components/libsodium/port_include -IC:/Users/Bilaltan/esp/esp-idf/components/mqtt/esp-mqtt/include -IC:/Users/Bilaltan/esp/esp-idf/components/openssl/include -IC:/Users/Bilaltan/esp/esp-idf/components/perfmon/include -IC:/Users/Bilaltan/esp/esp-idf/components/spiffs/include -IC:/Users/Bilaltan/esp/esp-idf/components/ulp/include -IC:/Users/Bilaltan/esp/esp-idf/components/wifi_provisioning/include -mlongcalls -Wno-frame-address  -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -fmacro-prefix-map=C:/Users/Bilaltan/Desktop/esp32_projects/first_project=. -fmacro-prefix-map=C:/Users/Bilaltan/esp/esp-idf=IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.4.2\" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -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:/Users/Bilaltan/Desktop/esp32_projects/first_project/main/main.c
C:/Users/Bilaltan/Desktop/esp32_projects/first_project/main/main.c:8:10: fatal error: esp_bt.h: No such file or directory
 #include "esp_bt.h"
          ^~~~~~~~~~
compilation terminated.
[1026/1033] Building C object esp-idf/wifi_provisioning/CMakeFiles/__idf_wifi_provisioning.dir/src/manager.c.obj
ninja: build stopped: subcommand failed.

 *  The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command ninja " terminated with exit code: 1.
*main/CMakelists.txt :

Code: Select all

idf_component_register(SRCS "main.c"
                    INCLUDE_DIRS ".")
I think I use last version of ESF-IDF . I choosen last version while install esp-idf but when I built new project I see like this from template choose window : Image
Attachments
Screenshot_1.png
Screenshot_1.png (35.09 KiB) Viewed 5891 times

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP-IDF build error in vscode

Postby ESP_igrr » Tue Sep 20, 2022 7:16 am

It looks like you are trying to include a header file from 'bt' component, but your 'main' component has not declared the dependency on 'bt'.

You can fix this as follows:

idf_component_register(SRCS "main.c"
INCLUDE_DIRS "."
REQUIRES bt
)

Please see more information about component dependencies in the build system docs: https://docs.espressif.com/projects/esp ... quirements

Darkalles
Posts: 4
Joined: Thu Sep 15, 2022 12:35 am

Re: ESP-IDF build error in vscode

Postby Darkalles » Tue Sep 20, 2022 11:29 pm

Firstly thanks for your reply , I replaced Cmakelist.txt file like your suggestion but I have same error again.

Code: Select all

 *  Executing task: ninja  

[0/1] Re-running CMake...
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file C:/Users/Bilaltan/Desktop/esp32_projects/first_project/sdkconfig
-- App "first_project" version: 1
-- Adding linker script C:/Users/Bilaltan/Desktop/esp32_projects/first_project/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_system/ld/esp32/sections.ld.in        
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld      
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld 
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld    
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script C:/Users/Bilaltan/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- Components: app_trace app_update asio bootloader bootloader_support bt cbor cmock coap console cxx driver efuse esp-tls esp32 esp_adc_cal 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_ipc esp_lcd esp_local_ctrl esp_netif esp_phy esp_pm esp_ringbuf esp_rom esp_serial_slave_link esp_system esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos hal heap idf_test ieee802154 jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter tinyusb ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: C:/Users/Bilaltan/esp/esp-idf/components/app_trace C:/Users/Bilaltan/esp/esp-idf/components/app_update C:/Users/Bilaltan/esp/esp-idf/components/asio C:/Users/Bilaltan/esp/esp-idf/components/bootloader C:/Users/Bilaltan/esp/esp-idf/components/bootloader_support C:/Users/Bilaltan/esp/esp-idf/components/bt C:/Users/Bilaltan/esp/esp-idf/components/cbor C:/Users/Bilaltan/esp/esp-idf/components/cmock C:/Users/Bilaltan/esp/esp-idf/components/coap C:/Users/Bilaltan/esp/esp-idf/components/console 
C:/Users/Bilaltan/esp/esp-idf/components/cxx C:/Users/Bilaltan/esp/esp-idf/components/driver C:/Users/Bilaltan/esp/esp-idf/components/efuse C:/Users/Bilaltan/esp/esp-idf/components/esp-tls C:/Users/Bilaltan/esp/esp-idf/components/esp32 C:/Users/Bilaltan/esp/esp-idf/components/esp_adc_cal C:/Users/Bilaltan/esp/esp-idf/components/esp_common C:/Users/Bilaltan/esp/esp-idf/components/esp_eth C:/Users/Bilaltan/esp/esp-idf/components/esp_event C:/Users/Bilaltan/esp/esp-idf/components/esp_gdbstub C:/Users/Bilaltan/esp/esp-idf/components/esp_hid C:/Users/Bilaltan/esp/esp-idf/components/esp_http_client C:/Users/Bilaltan/esp/esp-idf/components/esp_http_server C:/Users/Bilaltan/esp/esp-idf/components/esp_https_ota C:/Users/Bilaltan/esp/esp-idf/components/esp_https_server C:/Users/Bilaltan/esp/esp-idf/components/esp_hw_support C:/Users/Bilaltan/esp/esp-idf/components/esp_ipc C:/Users/Bilaltan/esp/esp-idf/components/esp_lcd C:/Users/Bilaltan/esp/esp-idf/components/esp_local_ctrl C:/Users/Bilaltan/esp/esp-idf/components/esp_netif C:/Users/Bilaltan/esp/esp-idf/components/esp_phy C:/Users/Bilaltan/esp/esp-idf/components/esp_pm C:/Users/Bilaltan/esp/esp-idf/components/esp_ringbuf C:/Users/Bilaltan/esp/esp-idf/components/esp_rom C:/Users/Bilaltan/esp/esp-idf/components/esp_serial_slave_link C:/Users/Bilaltan/esp/esp-idf/components/esp_system C:/Users/Bilaltan/esp/esp-idf/components/esp_timer C:/Users/Bilaltan/esp/esp-idf/components/esp_websocket_client C:/Users/Bilaltan/esp/esp-idf/components/esp_wifi C:/Users/Bilaltan/esp/esp-idf/components/espcoredump C:/Users/Bilaltan/esp/esp-idf/components/esptool_py C:/Users/Bilaltan/esp/esp-idf/components/expat C:/Users/Bilaltan/esp/esp-idf/components/fatfs C:/Users/Bilaltan/esp/esp-idf/components/freemodbus C:/Users/Bilaltan/esp/esp-idf/components/freertos C:/Users/Bilaltan/esp/esp-idf/components/hal C:/Users/Bilaltan/esp/esp-idf/components/heap C:/Users/Bilaltan/esp/esp-idf/components/idf_test C:/Users/Bilaltan/esp/esp-idf/components/ieee802154 C:/Users/Bilaltan/esp/esp-idf/components/jsmn C:/Users/Bilaltan/esp/esp-idf/components/json C:/Users/Bilaltan/esp/esp-idf/components/libsodium C:/Users/Bilaltan/esp/esp-idf/components/log C:/Users/Bilaltan/esp/esp-idf/components/lwip C:/Users/Bilaltan/Desktop/esp32_projects/first_project/main C:/Users/Bilaltan/esp/esp-idf/components/mbedtls C:/Users/Bilaltan/esp/esp-idf/components/mdns C:/Users/Bilaltan/esp/esp-idf/components/mqtt C:/Users/Bilaltan/esp/esp-idf/components/newlib C:/Users/Bilaltan/esp/esp-idf/components/nghttp C:/Users/Bilaltan/esp/esp-idf/components/nvs_flash C:/Users/Bilaltan/esp/esp-idf/components/openssl C:/Users/Bilaltan/esp/esp-idf/components/openthread C:/Users/Bilaltan/esp/esp-idf/components/partition_table C:/Users/Bilaltan/esp/esp-idf/components/perfmon C:/Users/Bilaltan/esp/esp-idf/components/protobuf-c C:/Users/Bilaltan/esp/esp-idf/components/protocomm C:/Users/Bilaltan/esp/esp-idf/components/pthread C:/Users/Bilaltan/esp/esp-idf/components/sdmmc C:/Users/Bilaltan/esp/esp-idf/components/soc C:/Users/Bilaltan/esp/esp-idf/components/spi_flash C:/Users/Bilaltan/esp/esp-idf/components/spiffs C:/Users/Bilaltan/esp/esp-idf/components/tcp_transport C:/Users/Bilaltan/esp/esp-idf/components/tcpip_adapter C:/Users/Bilaltan/esp/esp-idf/components/tinyusb C:/Users/Bilaltan/esp/esp-idf/components/ulp C:/Users/Bilaltan/esp/esp-idf/components/unity C:/Users/Bilaltan/esp/esp-idf/components/usb C:/Users/Bilaltan/esp/esp-idf/components/vfs C:/Users/Bilaltan/esp/esp-idf/components/wear_levelling C:/Users/Bilaltan/esp/esp-idf/components/wifi_provisioning C:/Users/Bilaltan/esp/esp-idf/components/wpa_supplicant C:/Users/Bilaltan/esp/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Bilaltan/Desktop/esp32_projects/first_project/build
[2/11] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\Users\Bilaltan\Desktop\esp32_projects\first_project\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/Users/Bilaltan/esp/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Users/Bilaltan/Desktop/esp32_projects/first_project/build/bootloader/bootloader.bin"
Bootloader binary size 0x6330 bytes. 0xcd0 bytes (11%) free.
[3/9] 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-2021r2-patch3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -IC:/Users/Bilaltan/Desktop/esp32_projects/first_project/build/config -IC:/Users/Bilaltan/Desktop/esp32_projects/first_project/main -IC:/Users/Bilaltan/esp/esp-idf/components/newlib/platform_include -IC:/Users/Bilaltan/esp/esp-idf/components/freertos/include -IC:/Users/Bilaltan/esp/esp-idf/components/freertos/include/esp_additions/freertos -IC:/Users/Bilaltan/esp/esp-idf/components/freertos/port/xtensa/include -IC:/Users/Bilaltan/esp/esp-idf/components/freertos/include/esp_additions -IC:/Users/Bilaltan/esp/esp-idf/components/esp_hw_support/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_hw_support/include/soc -IC:/Users/Bilaltan/esp/esp-idf/components/esp_hw_support/include/soc/esp32 -IC:/Users/Bilaltan/esp/esp-idf/components/esp_hw_support/port/esp32/. -IC:/Users/Bilaltan/esp/esp-idf/components/esp_hw_support/port/esp32/private_include -IC:/Users/Bilaltan/esp/esp-idf/components/heap/include -IC:/Users/Bilaltan/esp/esp-idf/components/log/include -IC:/Users/Bilaltan/esp/esp-idf/components/lwip/include/apps -IC:/Users/Bilaltan/esp/esp-idf/components/lwip/include/apps/sntp -IC:/Users/Bilaltan/esp/esp-idf/components/lwip/lwip/src/include -IC:/Users/Bilaltan/esp/esp-idf/components/lwip/port/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/lwip/port/esp32/include/arch -IC:/Users/Bilaltan/esp/esp-idf/components/soc/include -IC:/Users/Bilaltan/esp/esp-idf/components/soc/esp32/. -IC:/Users/Bilaltan/esp/esp-idf/components/soc/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/hal/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/hal/include -IC:/Users/Bilaltan/esp/esp-idf/components/hal/platform_port/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_rom/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_rom/include/esp32 -IC:/Users/Bilaltan/esp/esp-idf/components/esp_rom/esp32 -IC:/Users/Bilaltan/esp/esp-idf/components/esp_common/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_system/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_system/port/soc -IC:/Users/Bilaltan/esp/esp-idf/components/esp_system/port/public_compat -IC:/Users/Bilaltan/esp/esp-idf/components/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/xtensa/include -IC:/Users/Bilaltan/esp/esp-idf/components/xtensa/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/driver/include -IC:/Users/Bilaltan/esp/esp-idf/components/driver/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_pm/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_ringbuf/include -IC:/Users/Bilaltan/esp/esp-idf/components/efuse/include -IC:/Users/Bilaltan/esp/esp-idf/components/efuse/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/vfs/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_wifi/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_event/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_netif/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_eth/include -IC:/Users/Bilaltan/esp/esp-idf/components/tcpip_adapter/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_phy/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_phy/esp32/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_ipc/include -IC:/Users/Bilaltan/esp/esp-idf/components/app_trace/include -IC:/Users/Bilaltan/esp/esp-idf/components/esp_timer/include -IC:/Users/Bilaltan/esp/esp-idf/components/nvs_flash/include -IC:/Users/Bilaltan/esp/esp-idf/components/spi_flash/include -IC:/Users/Bilaltan/esp/esp-idf/components/mbedtls/port/include -IC:/Users/Bilaltan/esp/esp-idf/components/mbedtls/mbedtls/include -IC:/Users/Bilaltan/esp/esp-idf/components/mbedtls/esp_crt_bundle/include -mlongcalls -Wno-frame-address  -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -fmacro-prefix-map=C:/Users/Bilaltan/Desktop/esp32_projects/first_project=. -fmacro-prefix-map=C:/Users/Bilaltan/esp/esp-idf=IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.4.2\" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -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:/Users/Bilaltan/Desktop/esp32_projects/first_project/main/main.c
C:/Users/Bilaltan/Desktop/esp32_projects/first_project/main/main.c:8:10: fatal error: esp_bt.h: No such file or directory
 #include "esp_bt.h"
          ^~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.

 *  The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command ninja " terminated with exit code: 1. 
I have one solution for this problem I write my code into any ESP-IDF example project but it is not an efficient solution .

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP-IDF build error in vscode

Postby ESP_igrr » Wed Sep 21, 2022 2:34 pm

One other thing to check then, do you have Bluetooth enabled in the project configuration menu? (In VS Code you can open it by clicking on the sdkconfig file).

Who is online

Users browsing this forum: No registered users and 126 guests