h2zero / esp-nimble-cpp

C++ library for the esp32 NimBLE stack based on and mostly compatible with @nkolban cpp_utils BLE library.
https://h2zero.github.io/esp-nimble-cpp/
Apache License 2.0
167 stars 61 forks source link

Usability as ESP managed component #118

Closed mickeyl closed 1 year ago

mickeyl commented 1 year ago

I tried to use esp-nimble-cpp as a managed component by adding it to my idf_component.yml, e.g.:

dependencies:
  espressif/led_strip: "^2.0.0"
  h2zero/esp-nimble-cpp:
    git: "https://github.com/h2zero/esp-nimble-cpp"

After adding a idf_component.yml to esp-nimble-cpp in its top directory w/ the following contents, it was found:

version: "1.5.0"
description: C++ library for the ESP32 NimBLE stack
url: https://github.com/h2zero/esp-nimble-cpp
dependencies:
  idf: ">=5.0"

Unfortunately though, I get strange build errors using it that way. Some include files are not found, etc. I wonder if anyone else attempted this before?

mickeyl commented 1 year ago

Further inspection shows that the culprit might actually not be this library, but rather a bug in the ESP32C6 support in ESP-IDF 5.1 release branch. See https://github.com/espressif/esp-idf/issues/11384

mickeyl commented 1 year ago

Sorry for the noise. FWIW, it works very nicely as a managed component. You might want to incorporate that (mutatis mutandis).

h2zero commented 1 year ago

Glad to hear this, thanks!