Page 1 of 1

ESP-IDF 5.1 想要build 例程中的蓝牙例程gatt_server menuconfig该如何配置

Posted: Sun Dec 24, 2023 8:55 am
by huahua
目前编译的时候遇到以下报错,初次接触ESP32的配置,期待大佬们能帮忙解答一下-idf/main/CMakeFiles/__idf_main.dir/gatts_demo.c.obj -MF esp-idf\main\CMakeFiles\__idf_main.dir\gatts_demo.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/gatts_demo.c.obj -c C:/esp/gatt_server/main/gatts_demo.c
C:/esp/gatt_server/main/gatts_demo.c: In function 'app_main':
C:/esp/gatt_server/main/gatts_demo.c:704:5: error: unknown type name 'esp_bluedroid_config_t'; did you mean 'esp_bluedroid_status_t'?
704 | esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT();
| ^~~~~~~~~~~~~~~~~~~~~~
| esp_bluedroid_status_t

C:/esp/gatt_server/main/gatts_demo.c:704:44: error: implicit declaration of function 'BT_BLUEDROID_INIT_CONFIG_DEFAULT'; did you mean 'BT_CONTROLLER_INIT_CONFIG_DEFAULT'? [-Werror=implicit-function-declaration]
704 | esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| BT_CONTROLLER_INIT_CONFIG_DEFAULT

C:/esp/gatt_server/main/gatts_demo.c:705:11: error: implicit declaration of function 'esp_bluedroid_init_with_cfg'; did you mean 'esp_bluedroid_init'? [-Werror=implicit-function-declaratio
]
705 | ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| esp_bluedroid_init
cc1.exe: some warnings being treated as errors

ninja: build stopped: subcommand failed.

Re: ESP-IDF 5.1 想要build 例程中的蓝牙例程gatt_server menuconfig该如何配置

Posted: Wed Jan 03, 2024 6:21 am
by ESP_MacChu
这还不涉及到项目的配置问题,怀疑是 idf 安装问题。可以参考:
https://docs.espressif.com/projects/esp ... et-esp-idf