Skip to content

Commit

Permalink
Merge pull request #9 from esp-rs/feature/default-v4.4
Browse files Browse the repository at this point in the history
Default to v4.4
  • Loading branch information
ivmarkov authored Mar 31, 2022
2 parents 291170e + a511243 commit d92ab84
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
3 changes: 2 additions & 1 deletion cargo/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ rustflags = ["-C", "default-linker-libraries"]
[unstable]
{% if std %}
build-std = ["std", "panic_abort"]{% else %}build-std = ["core", "alloc", "panic_abort"]{% endif %}
build-std-features = ["panic_immediate_abort"]
{% if espidfver != "v4.3.2" %}#{% endif %}build-std-features = ["panic_immediate_abort"] # required for older esp-idf versions without a realpath implementation

[env]
# Note: these variables are not used when using pio builder
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF stable (v4.4)
{% if espidfver != "v4.4" %}#{% endif %}ESP_IDF_VERSION = { value = "branch:release/v4.4" }
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF master (v5.0)
Expand Down
4 changes: 2 additions & 2 deletions cargo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ debug = true # Symbols are nice and they don't increase the size on Flash
opt-level = "z"

[features]
{% if espidfver <> 'v4.3.2' %}default = ["native"]
{% endif %}native = ["esp-idf-sys/native"]
{% if espidfver == "v4.3.2" %}default = ["pio"]
{% endif %}pio = ["esp-idf-sys/pio"]

[dependencies]
{% if std %}esp-idf-sys = { version = "0.31", features = ["binstart"] }
Expand Down
2 changes: 1 addition & 1 deletion cargo/cargo-generate.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ description1 = "My description"
mcu = { type = "string", prompt = "MCU", choices = ["esp32", "esp32s2", "esp32s3", "esp32c3"], default = "esp32" }
toolchain = { type = "string", prompt = "Rust toolchain (beware: nightly works only for esp32c3!)", choices = ["esp", "nightly"], default = "esp" }
std = { type = "bool", prompt = "STD support", default = true }
espidfver = { type = "string", prompt = "ESP-IDF native build version (v4.3.2 = previous stable, v4.4 = stable, v5.0 = development; NOTE: applicable only with `cargo build --features native`)", choices = ["v4.3.2", "v4.4", "v5.0"], default = "v4.3.2" }
espidfver = { type = "string", prompt = "ESP-IDF native build version (v4.3.2 = previous stable, v4.4 = stable, v5.0 = development; NOTE: applicable only with `cargo build --features native`)", choices = ["v4.4", "v4.3.2", "v5.0"], default = "v4.4" }
8 changes: 2 additions & 6 deletions cargo/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[toolchain]
{% if toolchain == "esp" %}
channel = "esp"
{% endif %}
{% if toolchain == "nightly" %}
channel = "nightly"
{% endif %}
{% if toolchain == "esp" %}channel = "esp"{% endif %}
{% if toolchain == "nightly" %}channel = "nightly"{% endif %}

0 comments on commit d92ab84

Please sign in to comment.