esp-rs / esp-idf-hal

embedded-hal implementation for Rust on ESP32 and ESP-IDF
https://docs.esp-rs.org/esp-idf-hal/
Apache License 2.0
461 stars 171 forks source link

Error when compiling fresh project #361

Closed Flamabalistic closed 9 months ago

Flamabalistic commented 10 months ago

I've just started a new std project, following the instructions in https://esp-rs.github.io/book, and I'm having trouble getting the template to compile.

I've created the template using cargo generate esp-rs/esp-idf-template cargo -> esp32s2 -> use default options. I have not made any changes after this.

When running cargo run, I receive the following error:

error[E0425]: cannot find value `g_wifi_feature_caps` in this scope
   --> C:\Users\torna\.cargo\registry\src\index.crates.io-6f17d22bba15001f\esp-idf-svc-0.47.3\src\wifi.rs:498:36
    |
498 |             feature_caps: unsafe { g_wifi_feature_caps },
    |                                    ^^^^^^^^^^^^^^^^^^^ not found in this scope

For more information about this error, try `rustc --explain E0425`.
error: could not compile `esp-idf-svc` (lib) due to previous error

Additional notes:

Vollbrecht commented 10 months ago

thanks for reporting, there seams to be some problems with respect to psram. Some updates where made in upstream esp-idf but not backported yet.

Could you try setting CONFIG_ESP32_SPIRAM_SUPPORT=n or CONFIG_SPIRAM_IGNORE_NOTFOUND=y in the sdkconfig.default file and rebuild with that options.

We will see in the meantime if we can salvage the situation with maybe some conditional foo added here.

Some meta info -> here is longterm fix deployed More meta info -> here

Flamabalistic commented 10 months ago

I tried placing CONFIG_ESP32_SPIRAM_SUPPORT=n, and CONFIG_SPIRAM_IGNORE_NOTFOUND=y in sdkconfig.defaults, same issue.

I also tried putting just one in and building, then putting just the other in and building, which also didn't work.

I'm relatively new, so just to make sure I'm doing this right, I'm:

In case it helps with tracking the problem, it's apparently been around since at least Dec 25 - being reported here

SuddenlyHazel commented 10 months ago

Hitting the same issue with esp32c3

As temporary workaround - I found creating a new project from without default settings, and selecting the 4.4 version builds successfully.

ivmarkov commented 10 months ago

In case it helps with tracking the problem, it's apparently been around since at least Dec 25 - being reported here

On the positive side, our bug reports hit Reddit now!!

Seriously speaking, this would be fixed shortly (as in today, latest tmr). A bit stuck on the just-released e-hal 1.0 and waiting for the new embassy-time.

After that, we'll publish a new version of esp-idf-sys/hal/svc where this problem will be addressed.

ivmarkov commented 10 months ago

Bug-fixing commit - for reference: https://github.com/esp-rs/esp-idf-svc/commit/efa0e75aa0de6d74e61be2ff7e9b5ed11a7c2b17

ivmarkov commented 10 months ago

By the way folks (@Flamabalistic @SuddenlyHazel) the easiest way to escalate issues like that is the Matrix chat which is linked-in the README of this crate, rather than Reddit.

Flamabalistic commented 10 months ago

Good to know! (The reddit post isn't mine BTW, I just found it when looking for people with the same issue)