diff --git a/cargo/.cargo/config.toml b/cargo/.cargo/config.toml index cbed67b..55e8e98 100644 --- a/cargo/.cargo/config.toml +++ b/cargo/.cargo/config.toml @@ -4,27 +4,28 @@ {% if mcu != "esp32s2" %}#{% endif %}target = "xtensa-esp32s2-espidf" {% if mcu != "esp32s3" %}#{% endif %}target = "xtensa-esp32s3-espidf" {% if mcu != "esp32c3" %}#{% endif %}target = "riscv32imc-esp-espidf" -{% if espidfver != "mainline" %}#{% endif %}rustflags = "--cfg espidf_time64" # Extending time_t for esp-idf v5: https://github.com/esp-rs/rust/issues/110 [target.xtensa-esp32-espidf] linker = "ldproxy" runner = "espflash --monitor" +{% if espidfver != "mainline" %}#{% endif %}rustflags = ["--cfg", "espidf_time64"] # Extending time_t for ESP IDF 5: https://github.com/esp-rs/rust/issues/110 [target.xtensa-esp32s2-espidf] linker = "ldproxy" runner = "espflash --monitor" +{% if espidfver != "mainline" %}#{% endif %}rustflags = ["--cfg", "espidf_time64"] # Extending time_t for ESP IDF 5: https://github.com/esp-rs/rust/issues/110 [target.xtensa-esp32s3-espidf] linker = "ldproxy" runner = "espflash --monitor" +{% if espidfver != "mainline" %}#{% endif %}rustflags = ["--cfg", "espidf_time64"] # Extending time_t for ESP IDF 5: https://github.com/esp-rs/rust/issues/110 [target.riscv32imc-esp-espidf] linker = "ldproxy" runner = "espflash --monitor" - -# Future - necessary for the experimental "native build" of esp-idf-sys with ESP32C3 -# See also https://github.com/ivmarkov/embuild/issues/16 -rustflags = ["-C", "default-linker-libraries"] +# Future - necessary for the experimental "native build" of esp-idf-sys with ESP32C3. See also https://github.com/ivmarkov/embuild/issues/16 +# For ESP-IDF 5 add `espidf_time64` and for earlier versions - remove this flag: https://github.com/esp-rs/rust/issues/110 +{% if espidfver != "mainline" %}rustflags = ["-C", "default-linker-libraries"]{% else %}rustflags = ["--cfg", "espidf_time64", "-C", "default-linker-libraries"]{% endif %} [unstable] {% if std %}