You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, when I compile my project, I have this error:
error[E0308]: mismatched types
--> /home/xxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-sys-0.35.0/src/lib.rs:65:51
|
65 | const ESP_IDF_TIME64_CHECK_LIBC: ::libc::time_t = 0 as crate::time_t;
| ^^^^^^^^^^^^^^^^^^ expected `i64`, found `i32`
In .cargo/config.toml file, I had rustflags = ["--cfg", "espidf_time64"], but without success. I have this error:
error[E0308]: mismatched types
--> /home/xxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-sys-0.35.0/src/lib.rs:63:62
|
63 | const ESP_IDF_TIME64_CHECK: ::std::os::espidf::raw::time_t = 0 as crate::time_t;
| ^^^^^^^^^^^^^^^^^^ expected `i64`, found `i32`
error[E0308]: mismatched types
--> /home/xxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-sys-0.35.0/src/lib.rs:65:51
|
65 | const ESP_IDF_TIME64_CHECK_LIBC: ::libc::time_t = 0 as crate::time_t;
| ^^^^^^^^^^^^^^^^^^ expected `i64`, found `i32`
I try to use ESP-IDF v5.3.2 (previously v4.4.6) but I got this error:
Compiling embedded-svc v0.28.0
error[E0560]: struct `esp_idf_hal::sys::eth_esp32_emac_config_t` has no field named `smi_mdc_gpio_num`
--> /home/xxxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-svc-0.49.1/src/eth.rs:317:13
|
317 | smi_mdc_gpio_num: mdc,
| ^^^^^^^^^^^^^^^^ `esp_idf_hal::sys::eth_esp32_emac_config_t` does not have this field
|
= note: available fields are: `__bindgen_anon_1`, `clock_config`, `dma_burst_len`, `intr_priority`
error[E0560]: struct `esp_idf_hal::sys::eth_esp32_emac_config_t` has no field named `smi_mdio_gpio_num`
--> /home/xxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-svc-0.49.1/src/eth.rs:318:13
|
318 | smi_mdio_gpio_num: mdio,
| ^^^^^^^^^^^^^^^^^ `esp_idf_hal::sys::eth_esp32_emac_config_t` does not have this field
|
= note: available fields are: `__bindgen_anon_1`, `clock_config`, `dma_burst_len`, `intr_priority`
My .cargo/config.toml file:
[build]
target = ["xtensa-esp32-espidf"]
[target.xtensa-esp32-espidf]
linker = "ldproxy"
rustflags = ["--cfg", "espidf_time64"]
[unstable]
build-std = ["std", "panic_abort"]
[env]
# Note: these variables are not used when using pio builder (`cargo build --features pio`)
ESP_IDF_VERSION = "v4.4.6"
The build.rs file:
// Necessary because of this issue: https://github.com/rust-lang/cargo/issues/9641
fn main() -> Result<(), Box<dyn std::error::Error>> {
embuild::build::CfgArgs::output_propagated("ESP_IDF")?;
embuild::build::LinkArgs::output_propagated("ESP_IDF")?;
Ok(())
}
@emeric-martineau You are still on ESP-IDF V4.4.X and that's the root cause.
A quick fix is to remove espidf_time64 and instead add espidf_time32. See this for more info.
A longer-term fix is to upgrade your project to ESP-IDF 5.X (5.2.X is the latest version supported by the esp-idf-* Rust crates), as ESP-IDF 4.4.X is no longer supported.
Hello,
I have update my Rust tool chain with the last version of Rust for ESP32:
Now, when I compile my project, I have this error:
I try to use ESP-IDF v5.3.2 (previously
v4.4.6
) but I got this error:My
.cargo/config.toml
file:The build.rs file:
The
Cargo.toml
file:I've tried to fix it with reading issue #137, but without success.
Thanks for your help.
The text was updated successfully, but these errors were encountered: