espressif / esp-idf

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

Can't build bluetooth\bluedroid\classic_bt\hfp_hf example for esp32s3 (IDFGH-7484) #9054

Closed agr closed 2 years ago

agr commented 2 years ago

Environment

Problem Description

Using VS Code I created a project from hfp_hf example. When targeted to esp32s3 it fails to build. I retrieved the latest code for release/v4.4 branch from git and tried building it directly in examples directory (i.e. without copying anything as VS Code does, purely in command line) and it fails with the same error (if I target esp32, it builds).

Expected Behavior

It builds.

Actual Behavior

It fails to build.

Steps to reproduce

cd examples\bluetooth\bluedroid\classic_bt\hfp_hf
idf.py set-target esp32s3
idf.py build

Code to reproduce this issue

Just try building an example, no changes needed.

Build Logs

[901/1338] Building C object esp-idf/bt/CMakeFiles/__idf_bt.dir/host/bluedroid/hci/hci_layer.c.obj
FAILED: esp-idf/bt/CMakeFiles/__idf_bt.dir/host/bluedroid/hci/hci_layer.c.obj
ccache C:\Users\aaaa\esp\esp-idf\tools\xtensa-esp32s3-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s3-elf\bin\xtensa-esp32s3-elf-gcc.exe -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -Iconfig -I../../../../../../components/bt/common/osi/include -I../../../../../../components/bt/include/esp32s3/include -I../../../../../../components/bt/common/api/include/api -I../../../../../../components/bt/common/btc/profile/esp/blufi/include -I../../../../../../components/bt/common/btc/profile/esp/include -I../../../../../../components/bt/host/bluedroid/api/include/api -I../../../../../../components/bt/common/btc/include -I../../../../../../components/bt/common/include -I../../../../../../components/bt/host/bluedroid/bta/include -I../../../../../../components/bt/host/bluedroid/bta/ar/include -I../../../../../../components/bt/host/bluedroid/bta/av/include -I../../../../../../components/bt/host/bluedroid/bta/dm/include -I../../../../../../components/bt/host/bluedroid/bta/gatt/include -I../../../../../../components/bt/host/bluedroid/bta/hf_ag/include -I../../../../../../components/bt/host/bluedroid/bta/hf_client/include -I../../../../../../components/bt/host/bluedroid/bta/hd/include -I../../../../../../components/bt/host/bluedroid/bta/hh/include -I../../../../../../components/bt/host/bluedroid/bta/jv/include -I../../../../../../components/bt/host/bluedroid/bta/sdp/include -I../../../../../../components/bt/host/bluedroid/bta/sys/include -I../../../../../../components/bt/host/bluedroid/device/include -I../../../../../../components/bt/host/bluedroid/hci/include -I../../../../../../components/bt/host/bluedroid/external/sbc/decoder/include -I../../../../../../components/bt/host/bluedroid/external/sbc/encoder/include -I../../../../../../components/bt/host/bluedroid/external/sbc/plc/include -I../../../../../../components/bt/host/bluedroid/btc/profile/esp/include -I../../../../../../components/bt/host/bluedroid/btc/profile/std/a2dp/include -I../../../../../../components/bt/host/bluedroid/btc/profile/std/include -I../../../../../../components/bt/host/bluedroid/btc/include -I../../../../../../components/bt/host/bluedroid/stack/btm/include -I../../../../../../components/bt/host/bluedroid/stack/gap/include -I../../../../../../components/bt/host/bluedroid/stack/gatt/include -I../../../../../../components/bt/host/bluedroid/stack/hid/include -I../../../../../../components/bt/host/bluedroid/stack/l2cap/include -I../../../../../../components/bt/host/bluedroid/stack/sdp/include -I../../../../../../components/bt/host/bluedroid/stack/smp/include -I../../../../../../components/bt/host/bluedroid/stack/avct/include -I../../../../../../components/bt/host/bluedroid/stack/avrc/include -I../../../../../../components/bt/host/bluedroid/stack/avdt/include -I../../../../../../components/bt/host/bluedroid/stack/a2dp/include -I../../../../../../components/bt/host/bluedroid/stack/rfcomm/include -I../../../../../../components/bt/host/bluedroid/stack/include -I../../../../../../components/bt/host/bluedroid/common/include -I../../../../../../components/newlib/platform_include -I../../../../../../components/freertos/include -I../../../../../../components/freertos/include/esp_additions/freertos -I../../../../../../components/freertos/port/xtensa/include -I../../../../../../components/freertos/include/esp_additions -I../../../../../../components/esp_hw_support/include -I../../../../../../components/esp_hw_support/include/soc -I../../../../../../components/esp_hw_support/include/soc/esp32s3 -I../../../../../../components/esp_hw_support/port/esp32s3/. -I../../../../../../components/esp_hw_support/port/esp32s3/private_include -I../../../../../../components/heap/include -I../../../../../../components/log/include -I../../../../../../components/lwip/include/apps -I../../../../../../components/lwip/include/apps/sntp -I../../../../../../components/lwip/lwip/src/include -I../../../../../../components/lwip/port/esp32/include -I../../../../../../components/lwip/port/esp32/include/arch -I../../../../../../components/soc/include -I../../../../../../components/soc/esp32s3/. -I../../../../../../components/soc/esp32s3/include -I../../../../../../components/hal/esp32s3/include -I../../../../../../components/hal/include -I../../../../../../components/hal/platform_port/include -I../../../../../../components/esp_rom/include -I../../../../../../components/esp_rom/include/esp32s3 -I../../../../../../components/esp_rom/esp32s3 -I../../../../../../components/esp_common/include -I../../../../../../components/esp_system/include -I../../../../../../components/esp_system/port/soc -I../../../../../../components/esp_system/port/public_compat -I../../../../../../components/xtensa/include -I../../../../../../components/xtensa/esp32s3/include -I../../../../../../components/driver/include -I../../../../../../components/driver/esp32s3/include -I../../../../../../components/esp_pm/include -I../../../../../../components/esp_ringbuf/include -I../../../../../../components/efuse/include -I../../../../../../components/efuse/esp32s3/include -I../../../../../../components/vfs/include -I../../../../../../components/esp_wifi/include -I../../../../../../components/esp_event/include -I../../../../../../components/esp_netif/include -I../../../../../../components/esp_eth/include -I../../../../../../components/tcpip_adapter/include -I../../../../../../components/esp_phy/include -I../../../../../../components/esp_phy/esp32s3/include -I../../../../../../components/esp_ipc/include -I../../../../../../components/app_trace/include -I../../../../../../components/esp_timer/include -I../../../../../../components/nvs_flash/include -I../../../../../../components/spi_flash/include -I../../../../../../components/mbedtls/port/include -I../../../../../../components/mbedtls/mbedtls/include -I../../../../../../components/mbedtls/esp_crt_bundle/include -mlongcalls -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/aaaa/esp/esp-idf/frameworks/esp-idf-v4.4.1/examples/bluetooth/bluedroid/classic_bt/hfp_hf=. -fmacro-prefix-map=C:/Users/aaaa/esp/esp-idf/frameworks/esp-idf-v4.4.1=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-612-gd15b02fdb2\" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -Wno-implicit-fallthrough -Wno-unused-const-variable -MD -MT esp-idf/bt/CMakeFiles/__idf_bt.dir/host/bluedroid/hci/hci_layer.c.obj -MF esp-idf\bt\CMakeFiles\__idf_bt.dir\host\bluedroid\hci\hci_layer.c.obj.d -o esp-idf/bt/CMakeFiles/__idf_bt.dir/host/bluedroid/hci/hci_layer.c.obj -c C:/Users/aaaa/esp/esp-idf/frameworks/esp-idf-v4.4.1/components/bt/host/bluedroid/hci/hci_layer.c
C:/Users/aaaa/esp/esp-idf/frameworks/esp-idf-v4.4.1/components/bt/host/bluedroid/hci/hci_layer.c: In function 'hci_layer_init_env':
C:/Users/aaaa/esp/esp-idf/frameworks/esp-idf-v4.4.1/components/bt/host/bluedroid/hci/hci_layer.c:184:5: error: implicit declaration of function 'btsnd_hcic_ble_sync_sem_init'; did you mean 'btsnd_hcic_ble_set_phy'? [-Werror=implicit-function-declaration]
     btsnd_hcic_ble_sync_sem_init();
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
     btsnd_hcic_ble_set_phy
C:/Users/aaaa/esp/esp-idf/frameworks/esp-idf-v4.4.1/components/bt/host/bluedroid/hci/hci_layer.c: In function 'hci_layer_deinit_env':
C:/Users/aaaa/esp/esp-idf/frameworks/esp-idf-v4.4.1/components/bt/host/bluedroid/hci/hci_layer.c:207:5: error: implicit declaration of function 'btsnd_hcic_ble_sync_sem_deinit'; did you mean 'btsnd_hcic_ble_clear_adv_set'? [-Werror=implicit-function-declaration]
     btsnd_hcic_ble_sync_sem_deinit();
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     btsnd_hcic_ble_clear_adv_set
C:/Users/aaaa/esp/esp-idf/frameworks/esp-idf-v4.4.1/components/bt/host/bluedroid/hci/hci_layer.c: In function 'filter_incoming_event':
C:/Users/aaaa/esp/esp-idf/frameworks/esp-idf-v4.4.1/components/bt/host/bluedroid/hci/hci_layer.c:443:36: error: implicit declaration of function 'btsnd_hcic_ble_get_sync_info'; did you mean 'btsnd_hcic_ble_ext_scan_enable'? [-Werror=implicit-function-declaration]
             BlE_SYNC *sync_info =  btsnd_hcic_ble_get_sync_info();
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                    btsnd_hcic_ble_ext_scan_enable
xiongweichao commented 2 years ago

Hi @agr ,

hfp_hf example build error because ESP32S3 doesn't support classic bluetooth.

If you want to know which chips are supported by the example, you can read the README of the example. For example hfp_hf Supported Targets ESP32

Thanks