mirrexagon / nixpkgs-esp-dev

Nix flake and overlay for ESP8266 and ESP32 development.
Creative Commons Zero v1.0 Universal
143 stars 71 forks source link

idf.py build esp-idf's gatt_server demo fail #35

Closed cowboyliao closed 9 months ago

cowboyliao commented 9 months ago

use nix --experimental-features 'nix-command flakes' develop github:mirrexagon/nixpkgs-esp-dev#esp32c3-idf, then clone esp-idf github repo, in esp-idf/examples/bluetooth/bluedroid/ble/gatt_server,

idf.py set-target esp32c3 idf.py build

/home/randy/test/esp/esp-idf/examples/bluetooth/bluedroid/ble/gatt_server/main/gatts_demo.c: In function 'app_main':
/home/randy/test/esp/esp-idf/examples/bluetooth/bluedroid/ble/gatt_server/main/gatts_demo.c:845:3: error: unknown type name 'esp_bluedroid_config_t'; did you mean 'esp_bluedroid_status_t'?
  845 |   esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT();
      |   ^~~~~~~~~~~~~~~~~~~~~~
      |   esp_bluedroid_status_t
/home/randy/test/esp/esp-idf/examples/bluetooth/bluedroid/ble/gatt_server/main/gatts_demo.c:845:42: error: implicit declaration of function 'BT_BLUEDROID_INIT_CONFIG_DEFAULT'; did you mean 'BT_CONTROLLER_INIT_CONFIG_DEFAULT'? [-Werror=implicit-function-declaration]
  845 |   esp_bluedroid_config_t bluedroid_cfg = BT_BLUEDROID_INIT_CONFIG_DEFAULT();
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                          BT_CONTROLLER_INIT_CONFIG_DEFAULT
/home/randy/test/esp/esp-idf/examples/bluetooth/bluedroid/ble/gatt_server/main/gatts_demo.c:846:9: error: implicit declaration of function 'esp_bluedroid_init_with_cfg'; did you mean 'esp_bluedroid_init'? [-Werror=implicit-function-declaration]
  846 |   ret = esp_bluedroid_init_with_cfg(&bluedroid_cfg);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         esp_bluedroid_init

the error is also mentioned in esp32 Chinese Forum, and someone said "idf 安装问题" means "might be idf install issues". Does this is an issuse of this nix idf, or I just missing anything wrong like version stuff, how to fix this?

cowboyliao commented 9 months ago

after 5 minutes, 'git checkout release/v5.1' solved the issues.