esp-rs / esp-idf-svc

Type-Safe Rust Wrappers for various ESP-IDF services (WiFi, Network, Httpd, Logging, etc.)
https://docs.esp-rs.org/esp-idf-svc/
Apache License 2.0
332 stars 183 forks source link

ESP32C6 Wifi API with cmake project #501

Closed mzakharocsc closed 1 month ago

mzakharocsc commented 1 month ago

Hello, I am using esp32c6 with IDF 5.2.2. I followed the following cmake build tutorial : https://github.com/esp-rs/esp-idf-template/blob/master/README-cmake.md

However, I cannot access wifi libraries. I get the following compile error:

103 | pub mod wifi;
    |         ^^^^
note: the item is gated here    |
97  | / #[cfg(all(
98  | |     not(esp32h2),
99  | |     feature = "alloc",
100 | |     esp_idf_comp_esp_wifi_enabled,
101 | |     esp_idf_comp_esp_event_enabled,
102 | | ))]

I saw soluiton in https://github.com/esp-rs/esp-idf-svc/issues/307 but it does not seem to apply to cmake based projects. Any help would be kindly appreciated.

ivmarkov commented 1 month ago

Did you read and do this?

mzakharocsc commented 1 month ago

Did you read and do this?

Yes, my list of components is the following:

set(RUST_DEPS "pthread" "driver" "vfs" "esp_http_client" "esp_http_server" "espcoredump" "nvs_flash" "spi_flash" "mqtt")

with app_update did not even compile, but thats a story for another issue.

ivmarkov commented 1 month ago

Did you read and do this?

Yes, my list of components is the following:

set(RUST_DEPS "pthread" "driver" "vfs" "esp_http_client" "esp_http_server" "espcoredump" "nvs_flash" "spi_flash" "mqtt")

with app_update did not even compile, but thats a story for another issue.

Have you tried putting esp_wifi in that list?

mzakharocsc commented 1 month ago

Thank you for your help. The following list of dependencies was needed to get basic wifi example working: "esp_wifi" "esp_event" "wpa_supplicant" "esp_netif" "lwip"

As for app_update, bootloader_support was needed as well.

ivmarkov commented 1 month ago

Yes. These components weren't necessary in the 4.4. days, probably because they were enabled by the others. With esp idf 5 the situation might had changed, but the approach remains the same.