From 1775e1469913fe3342523ccf037affa4428b680b Mon Sep 17 00:00:00 2001 From: Simon Redman Date: Sun, 11 Jun 2023 12:45:37 -0400 Subject: [PATCH] Add conditionals to ensure only supported ESP-IDF versions are allowed per board --- cargo/cargo-generate.toml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cargo/cargo-generate.toml b/cargo/cargo-generate.toml index d9b6fa8..c153ee1 100644 --- a/cargo/cargo-generate.toml +++ b/cargo/cargo-generate.toml @@ -21,7 +21,19 @@ type = "bool" prompt = "Enable STD support?" default = true -[conditional.'defaults == false'.placeholders.espidfver] +[conditional.'defaults == false && (mcu == "esp32c6" || mcu == "esp32p4" || mcu == "esp32h2")'.placeholders.espidfver] +type = "string" +prompt = "ESP-IDF version (master = UNSTABLE)" +choices = ["master"] # Supported as of v5.1 +default = "master" + +[conditional.'defaults == false && (mcu == "esp32c2")'.placeholders.espidfver] +type = "string" +prompt = "ESP-IDF version (master = UNSTABLE)" +choices = ["v5.0", "master"] +default = "v5.0" + +[conditional.'defaults == false && (mcu == "esp32" || mcu == "esp32c3" || mcu == "esp32s2" || mcu == "esp32s3")'.placeholders.espidfver] type = "string" prompt = "ESP-IDF version (master = UNSTABLE)" choices = ["v4.4", "v5.0", "master"]