ESP-IDF 5.1 想要build 例程中的蓝牙例程gatt_server menuconfig该如何配置
Posted: 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.
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.