Bluetooth with ESP-IDF (fatal error: esp_bt.h: No such file or directory)

I created a new ESP-IDF project and replaced the empty.c file with
example_spp_acceptor_demo.c

from:
framework-espidf\examples\bluetooth\bluedroid\classic_bt\bt_spp_acceptor\

Unfortunately the example does not compile, because it includes esp_bt.h
and compiler is not told to look into framework-espidf\components\bt\include

Basically this is missing in the compiler invocation:
-IC:\users\marcin.platformio\packages\framework-espidf\components\bt\include

Here are complete logs:

> Executing task in folder SIO2BT_PIO: C:\Users\MARCIN\.platformio\penv\Scripts\platformio.exe run --verbose <

Processing az-delivery-devkit-v4 (platform: espressif32; board: az-delivery-devkit-v4; framework: espidf)
---------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/az-delivery-devkit-v4.html
PLATFORM: Espressif 32 1.12.0 > AZ-Delivery ESP-32 Dev Kit C V4
HARDWARE: ESP32 240MHz, 520KB RAM, 16MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-espidf 3.40000.200303 (4.0.0)
 - tool-cmake 3.16.5
 - tool-esptoolpy 1.20600.0 (2.6.0)
 - tool-idf 1.0.1
 - tool-mconf 1.4060000.20190628 (406.0.0) 
 - tool-ninja 1.9.0
 - toolchain-esp32ulp 1.22851.190618 (2.28.51)
 - toolchain-xtensa32 2.80200.200226 (8.2.0)
Reading CMake configuration...
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.13.2.windows.1") 
-- mconf-idf version mconf-v4.6.0.0-idf-20190628-win32
-- IDF_TARGET not set, using default target: esp32
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/MARCIN/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe  
-- Check for working C compiler: C:/Users/MARCIN/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/MARCIN/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Users/MARCIN/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++.exe
-- Check for working CXX compiler: C:/Users/MARCIN/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- 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.
-- Project version: 1
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
Python requirements from C:\Users\MARCIN\.platformio\packages\framework-espidf\requirements.txt are satisfied.
-- Found PythonInterp: C:/Users/MARCIN/.platformio/penv/Scripts/python.exe (found version "2.7.13")       
-- Could NOT find Perl (missing: PERL_EXECUTABLE)
-- Adding linker script C:/Projects/SIO2BT_PIO/.pio/build/az-delivery-devkit-v4/esp-idf/esp32/esp32_out.ld
-- Adding linker script C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp32/ld/esp32.project.ld.in
-- Adding linker script C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Components: app_trace app_update asio bootloader bootloader_support bt coap console cxx driver efuse esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_http_client esp_http_server esp_https_ota esp_https_server esp_local_ctrl esp_ringbuf esp_rom esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos heap idf_test jsmn json libsodium log lwip mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table protobuf-c protocomm pthread sdmmc soc spi_flash spiffs src tcp_transport tcpip_adapter ulp unity vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: C:/Users/MARCIN/.platformio/packages/framework-espidf/components/app_trace C:/Users/MARCIN/.platformio/packages/framework-espidf/components/app_update C:/Users/MARCIN/.platformio/packages/framework-espidf/components/asio C:/Users/MARCIN/.platformio/packages/framework-espidf/components/bootloader C:/Users/MARCIN/.platformio/packages/framework-espidf/components/bootloader_support C:/Users/MARCIN/.platformio/packages/framework-espidf/components/bt C:/Users/MARCIN/.platformio/packages/framework-espidf/components/coap C:/Users/MARCIN/.platformio/packages/framework-espidf/components/console C:/Users/MARCIN/.platformio/packages/framework-espidf/components/cxx C:/Users/MARCIN/.platformio/packages/framework-espidf/components/driver C:/Users/MARCIN/.platformio/packages/framework-espidf/components/efuse C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp-tls C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp32 C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_adc_cal C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_common C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_eth C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_event C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_gdbstub C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_http_client C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_http_server C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_https_ota C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_https_server C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_local_ctrl C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_ringbuf C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_rom C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_websocket_client C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_wifi C:/Users/MARCIN/.platformio/packages/framework-espidf/components/espcoredump C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esptool_py C:/Users/MARCIN/.platformio/packages/framework-espidf/components/expat C:/Users/MARCIN/.platformio/packages/framework-espidf/components/fatfs C:/Users/MARCIN/.platformio/packages/framework-espidf/components/freemodbus C:/Users/MARCIN/.platformio/packages/framework-espidf/components/freertos C:/Users/MARCIN/.platformio/packages/framework-espidf/components/heap C:/Users/MARCIN/.platformio/packages/framework-espidf/components/idf_test C:/Users/MARCIN/.platformio/packages/framework-espidf/components/jsmn C:/Users/MARCIN/.platformio/packages/framework-espidf/components/json C:/Users/MARCIN/.platformio/packages/framework-espidf/components/libsodium C:/Users/MARCIN/.platformio/packages/framework-espidf/components/log C:/Users/MARCIN/.platformio/packages/framework-espidf/components/lwip C:/Users/MARCIN/.platformio/packages/framework-espidf/components/mbedtls C:/Users/MARCIN/.platformio/packages/framework-espidf/components/mdns C:/Users/MARCIN/.platformio/packages/framework-espidf/components/mqtt C:/Users/MARCIN/.platformio/packages/framework-espidf/components/newlib C:/Users/MARCIN/.platformio/packages/framework-espidf/components/nghttp C:/Users/MARCIN/.platformio/packages/framework-espidf/components/nvs_flash C:/Users/MARCIN/.platformio/packages/framework-espidf/components/openssl C:/Users/MARCIN/.platformio/packages/framework-espidf/components/partition_table C:/Users/MARCIN/.platformio/packages/framework-espidf/components/protobuf-c C:/Users/MARCIN/.platformio/packages/framework-espidf/components/protocomm C:/Users/MARCIN/.platformio/packages/framework-espidf/components/pthread C:/Users/MARCIN/.platformio/packages/framework-espidf/components/sdmmc C:/Users/MARCIN/.platformio/packages/framework-espidf/components/soc C:/Users/MARCIN/.platformio/packages/framework-espidf/components/spi_flash C:/Users/MARCIN/.platformio/packages/framework-espidf/components/spiffs C:/Projects/SIO2BT_PIO/src C:/Users/MARCIN/.platformio/packages/framework-espidf/components/tcp_transport C:/Users/MARCIN/.platformio/packages/framework-espidf/components/tcpip_adapter C:/Users/MARCIN/.platformio/packages/framework-espidf/components/ulp C:/Users/MARCIN/.platformio/packages/framework-espidf/components/unity C:/Users/MARCIN/.platformio/packages/framework-espidf/components/vfs C:/Users/MARCIN/.platformio/packages/framework-espidf/components/wear_levelling C:/Users/MARCIN/.platformio/packages/framework-espidf/components/wifi_provisioning C:/Users/MARCIN/.platformio/packages/framework-espidf/components/wpa_supplicant C:/Users/MARCIN/.platformio/packages/framework-espidf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Projects/SIO2BT_PIO/.pio/build/az-delivery-devkit-v4
fatal: Not a git repository (or any of the parent directories): .git
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.13.2.windows.1") 
-- mconf-idf version mconf-v4.6.0.0-idf-20190628-win32
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/MARCIN/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe  
-- Check for working C compiler: C:/Users/MARCIN/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/MARCIN/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Users/MARCIN/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++.exe
-- Check for working CXX compiler: C:/Users/MARCIN/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- 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.
-- Project version: 1
-- Building ESP-IDF components for target esp32
-- Adding linker script C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/MARCIN/.platformio/packages/framework-espidf/components/bootloader/subproject/main/esp32.bootloader.ld
-- Adding linker script C:/Users/MARCIN/.platformio/packages/framework-espidf/components/bootloader/subproject/main/esp32.bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp32 esp_common esp_rom esptool_py log main micro-ecc 
partition_table soc spi_flash xtensa
-- Component paths: C:/Users/MARCIN/.platformio/packages/framework-espidf/components/bootloader C:/Users/MARCIN/.platformio/packages/framework-espidf/components/bootloader_support C:/Users/MARCIN/.platformio/packages/framework-espidf/components/efuse C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp32 C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_common C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esp_rom C:/Users/MARCIN/.platformio/packages/framework-espidf/components/esptool_py C:/Users/MARCIN/.platformio/packages/framework-espidf/components/log C:/Users/MARCIN/.platformio/packages/framework-espidf/components/bootloader/subproject/main C:/Users/MARCIN/.platformio/packages/framework-espidf/components/bootloader/subproject/components/micro-ecc C:/Users/MARCIN/.platformio/packages/framework-espidf/components/partition_table C:/Users/MARCIN/.platformio/packages/framework-espidf/components/soc C:/Users/MARCIN/.platformio/packages/framework-espidf/components/spi_flash C:/Users/MARCIN/.platformio/packages/framework-espidf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Projects/SIO2BT_PIO/.pio/build/az-delivery-devkit-v4/bootloader   
fatal: Not a git repository (or any of the parent directories): .git
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
xtensa-esp32-elf-gcc -o .pio\build\az-delivery-devkit-v4\esp-idf\src\spp_acceptor.c.o -c -std=gnu99 -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -nostdlib -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -Wno-old-style-declaration -DPLATFORMIO=40301 -DARDUINO_ESP32_DEV -D_GNU_SOURCE -DIDF_VER=\"HEAD-HASH-NOTFOUND\" -DGCC_NOT_5_2_0 -DESP_PLATFORM @"C:\Projects\SIO2BT_PIO\.pio\build\az-delivery-devkit-v4\longcmd-8db9988393e4c77f8a5655d66a1eac56" src\spp_acceptor.c
xtensa-esp32-elf-gcc -I"C:\Projects\SIO2BT_PIO\.pio\build\az-delivery-devkit-v4/config" -C -P -x c -E C:\users\marcin\.platformio\packages\framework-espidf\components\esp32\ld\esp32.ld -o .pio\build\az-delivery-devkit-v4\esp32_out.ld
"c:\users\marcin\.platformio\penv\scripts\python.exe" "C:\Users\MARCIN\.platformio\packages\framework-espidf\components\partition_table\gen_esp32part.py" -q --flash-size "16MB" C:\users\marcin\.platformio\packages\framework-espidf\components\partition_table\partitions_singleapp.csv .pio\build\az-delivery-devkit-v4\partitions.bin
xtensa-esp32-elf-gcc -o .pio\build\az-delivery-devkit-v4\esp-idf\spi_flash\partition.c.o -c -std=gnu99 -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -nostdlib -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -Wno-old-style-declaration -DPLATFORMIO=40301 -DARDUINO_ESP32_DEV -D_GNU_SOURCE -DIDF_VER=\"HEAD-HASH-NOTFOUND\" -DGCC_NOT_5_2_0 -DESP_PLATFORM -I.pio\build\az-delivery-devkit-v4\config -IC:\users\marcin\.platformio\packages\framework-espidf\components\spi_flash\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\spi_flash\private_include -IC:\users\marcin\.platformio\packages\framework-espidf\components\newlib\platform_include -IC:\users\marcin\.platformio\packages\framework-espidf\components\freertos\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\heap\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\log\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\soc\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\soc\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_rom\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_common\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\xtensa\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\xtensa\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\driver\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_ringbuf\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_event\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\tcpip_adapter\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\include\apps -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\include\apps\sntp -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\lwip\src\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\port\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\port\esp32\include\arch -IC:\users\marcin\.platformio\packages\framework-espidf\components\vfs\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_wifi\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_wifi\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_eth\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\efuse\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\efuse\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\app_trace\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\bootloader_support\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\app_update\include C:\users\marcin\.platformio\packages\framework-espidf\components\spi_flash\partition.c
xtensa-esp32-elf-gcc -o .pio\build\az-delivery-devkit-v4\esp-idf\spi_flash\spi_flash_rom_patch.c.o -c -std=gnu99 -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -nostdlib -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -Wno-old-style-declaration -DPLATFORMIO=40301 -DARDUINO_ESP32_DEV -D_GNU_SOURCE -DIDF_VER=\"HEAD-HASH-NOTFOUND\" -DGCC_NOT_5_2_0 -DESP_PLATFORM -I.pio\build\az-delivery-devkit-v4\config -IC:\users\marcin\.platformio\packages\framework-espidf\components\spi_flash\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\spi_flash\private_include -IC:\users\marcin\.platformio\packages\framework-espidf\components\newlib\platform_include -IC:\users\marcin\.platformio\packages\framework-espidf\components\freertos\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\heap\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\log\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\soc\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\soc\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_rom\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_common\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\xtensa\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\xtensa\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\driver\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_ringbuf\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_event\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\tcpip_adapter\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\include\apps -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\include\apps\sntp -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\lwip\src\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\port\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\port\esp32\include\arch -IC:\users\marcin\.platformio\packages\framework-espidf\components\vfs\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_wifi\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_wifi\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_eth\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\efuse\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\efuse\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\app_trace\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\bootloader_support\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\app_update\include C:\users\marcin\.platformio\packages\framework-espidf\components\spi_flash\spi_flash_rom_patch.c
xtensa-esp32-elf-gcc -o .pio\build\az-delivery-devkit-v4\esp-idf\spi_flash\spi_flash_chip_drivers.c.o -c -std=gnu99 -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -nostdlib -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -Wno-old-style-declaration -DPLATFORMIO=40301 -DARDUINO_ESP32_DEV -D_GNU_SOURCE -DIDF_VER=\"HEAD-HASH-NOTFOUND\" -DGCC_NOT_5_2_0 -DESP_PLATFORM -I.pio\build\az-delivery-devkit-v4\config -IC:\users\marcin\.platformio\packages\framework-espidf\components\spi_flash\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\spi_flash\private_include -IC:\users\marcin\.platformio\packages\framework-espidf\components\newlib\platform_include -IC:\users\marcin\.platformio\packages\framework-espidf\components\freertos\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\heap\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\log\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\soc\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\soc\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_rom\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_common\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\xtensa\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\xtensa\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\driver\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_ringbuf\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_event\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\tcpip_adapter\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\include\apps -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\include\apps\sntp -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\lwip\src\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\port\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\lwip\port\esp32\include\arch -IC:\users\marcin\.platformio\packages\framework-espidf\components\vfs\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_wifi\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_wifi\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\esp_eth\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\efuse\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\efuse\esp32\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\app_trace\include -IC:\users\marcin\.platformio\packages\framework-espidf\components\bootloader_support\include 
-IC:\users\marcin\.platformio\packages\framework-espidf\components\app_update\include C:\users\marcin\.platformio\packages\framework-espidf\components\spi_flash\spi_flash_chip_drivers.c
src\spp_acceptor.c:18:10: fatal error: esp_bt.h: No such file or directory

****************************************************************
* Looking for esp_bt.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:esp_bt.h"
* Web  > https://platformio.org/lib/search?query=header:esp_bt.h
*
****************************************************************

 #include "esp_bt.h"
          ^~~~~~~~~~
compilation terminated.
*** [.pio\build\az-delivery-devkit-v4\esp-idf\src\spp_acceptor.c.o] Error 1
====================================== [FAILED] Took 25.37 seconds ======================================
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

Seems like the same as: Installing ESP-IDF 4.0 in platformio - #7 by AussieSusan

1 Like

Thank you for the hint.
Yes, it looks like the issue you linked above.

In the meantime I solved it by manually editing sdkconfig file.
I added following flags (which were commented out):

CONFIG_BT_ENABLED=y
CONFIG_BT_CLASSIC_ENABLED=y
CONFIG_BT_SPP_ENABLED=y

1 Like

The latest update does have ‘menuconfig’ available.
Try ‘pio run -t menuconfig’ (making sure that the build-in terminal is large enough - you will get an error message if it is too small). you can then set the bluetooth options.
At a guess you probably need to check this for whatever components you want to use in your app.
Susan

1 Like

I just went through a fresh install of platformio and VSCode on a Mac for ESP32 development. I am trying to compile the Blufi example from the espidf SDK. The following header files are not found:
#include “esp_bt.h”
#include “esp_blufi_api.h”
#include “esp_bt_defs.h”
#include “esp_gap_ble_api.h”
#include “esp_bt_main.h”
#include “esp_bt_device.h”
I am stuck. Can you please let me know if there is a workaround?
Thanks,
Michael

From the comments above, it seems like you need to either edit the sdkconfig file, or run menuconfig to enable the BT flags before the includes will be seen… have you done that?

I tried that…it worked! Thank you!

1 Like

how can I see my board on the phone? Do I need some app? I looked at LightBlue app but the board is not there. Can someone give a hint? I am using the espidf-ble-eddystone example