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

huahua
Posts: 2
Joined: Sun Dec 24, 2023 6:21 am

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

Postby huahua » Sun Dec 24, 2023 8:55 am

目前编译的时候遇到以下报错,初次接触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.

ESP_MacChu
Posts: 47
Joined: Tue Nov 21, 2023 7:53 am

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

Postby ESP_MacChu » Wed Jan 03, 2024 6:21 am

这还不涉及到项目的配置问题,怀疑是 idf 安装问题。可以参考:
https://docs.espressif.com/projects/esp ... et-esp-idf

Who is online

Users browsing this forum: No registered users and 135 guests