Skip to content

Commit

Permalink
Small updates now native is the default approach.
Browse files Browse the repository at this point in the history
  • Loading branch information
MabezDev committed Mar 30, 2022
1 parent 6881dbf commit be14b14
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cargo/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,27 @@ build-std = ["std", "panic_abort"]{% else %}build-std = ["core", "alloc", "panic
{% if espidfver != "v4.3.2" %}#{% endif %}build-std-features = ["panic_immediate_abort"] # required for older esp-idf versions without a realpath implementation

[env]
<<<<<<< HEAD
# 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 older (v4.3)
{% if espidfver != "v4.3.2" %}#{% endif %}ESP_IDF_VERSION = { value = "branch:release/v4.3" }
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF master (v5.0)
{% if espidfver != "v5.0" %}#{% endif %}ESP_IDF_VERSION = { value = "master" }
=======
# Note: these variables are not used when using pio builder
# Build against ESP-IDF stable (v4.4)
{% if espidfver != "stable" %}#{% endif %}ESP_IDF_VERSION = { value = "branch:release/v4.4" }
# Build against ESP-IDF older (v4.3)
{% if espidfver != "older" %}#{% endif %}ESP_IDF_VERSION = { value = "branch:release/v4.3" }
# Build against ESP-IDF master (v5.0)
{% if espidfver != "master" %}#{% endif %}ESP_IDF_VERSION = { value = "master" }

# These configurations will pick up your custom "sdkconfig.release", "sdkconfig.debug" or "sdkconfig.defaults[.*]" files
# that you might put in the root of the project
# The easiest way to generate a full "sdkconfig[.release|debug]" configuration (as opposed to manually enabling only the necessary flags via "sdkconfig.defaults[.*]"
# is by running "cargo pio espidf menuconfig" (that is, if using the pio builder)
#ESP_IDF_SDKCONFIG = { value = "./sdkconfig.release", relative = true }
#ESP_IDF_SDKCONFIG = { value = "./sdkconfig.debug", relative = true }
ESP_IDF_SDKCONFIG_DEFAULTS = { value = "./sdkconfig.defaults", relative = true }
>>>>>>> 19cb15f (Small updates now native is the default approach.)
4 changes: 4 additions & 0 deletions cargo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ debug = true # Symbols are nice and they don't increase the size on Flash
opt-level = "z"

[features]
<<<<<<< HEAD
{% if espidfver <> 'v4.3.2' %}default = ["native"]
{% endif %}native = ["esp-idf-sys/native"]
=======
pio = ["esp-idf-sys/pio"]
>>>>>>> 19cb15f (Small updates now native is the default approach.)

[dependencies]
{% if std %}esp-idf-sys = { version = "0.31", features = ["binstart"] }
Expand Down
4 changes: 4 additions & 0 deletions cargo/cargo-generate.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ 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 }
<<<<<<< HEAD
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.4" }
=======
espidfver = { type = "string", prompt = "ESP-IDF native build version (stable = 4.4, older = 4.3.1, master = 5.0 (EXPERIMENTAL); applicable only with `cargo build --features native`)", choices = ["stable", "older", "master"], default = "stable" }
>>>>>>> 19cb15f (Small updates now native is the default approach.)

0 comments on commit be14b14

Please sign in to comment.