diff --git a/cargo/.cargo/config.toml b/cargo/.cargo/config.toml index e749ecb..d929fb4 100644 --- a/cargo/.cargo/config.toml +++ b/cargo/.cargo/config.toml @@ -25,3 +25,12 @@ ESP_IDF_VERSION = "master" {% endif %} # Workaround for https://github.com/esp-rs/esp-idf-template/issues/174 CRATE_CC_NO_DEFAULTS = "1" + +# Set the install location for the ESP-IDF framework tooling. +{%- if installdir == "workspace - per project (inside .embuild)" %} +ESP_IDF_TOOLS_INSTALL_DIR = "workspace" +{% elsif installdir == "global - per user (inside $HOME/.espressif)" %} +ESP_IDF_TOOLS_INSTALL_DIR = "global" +{% endif %} + +# For more ESP-IDF specific build options check out https://github.com/esp-rs/esp-idf-sys/blob/master/BUILD-OPTIONS.md \ No newline at end of file diff --git a/cargo/Cargo.toml b/cargo/Cargo.toml index b939f2b..bcf3d3a 100644 --- a/cargo/Cargo.toml +++ b/cargo/Cargo.toml @@ -36,4 +36,12 @@ log = { version = "0.4", default-features = false } esp-idf-svc = { version = "0.49", default-features = false } [build-dependencies] -embuild = "0.32.0" \ No newline at end of file +embuild = "0.32.0" + +{%- if git %} + +[patch.crates-io] +esp-idf-sys = { git = "https://github.com/esp-rs/esp-idf-sys"} +esp-idf-hal = { git = "https://github.com/esp-rs/esp-idf-hal"} +esp-idf-svc = { git = "https://github.com/esp-rs/esp-idf-svc"} +{%- endif %} \ No newline at end of file diff --git a/cargo/cargo-generate.toml b/cargo/cargo-generate.toml index a42a000..0702247 100644 --- a/cargo/cargo-generate.toml +++ b/cargo/cargo-generate.toml @@ -42,6 +42,17 @@ type = "bool" prompt = "Add CI files for GitHub Action?" default = false +[conditional.'advanced'.placeholders.installdir] +type = "string" +prompt = "Set installation dir of managed ESP-IDF version" +choices = ["workspace - per project (inside .embuild)", "global - per user (inside $HOME/.espressif)"] +default = "workspace - per project (inside .embuild)" + +[conditional.'advanced'.placeholders.git] +type = "bool" +prompt = "Use latest git versions of esp-idf-* crates, instead of released crates.io versions" +default = false + [conditional.'!devcontainer'] ignore = [ ".devcontainer/",