upgrade to ESP_IDF release/v5.0

also mirror all the config files to the ones created with this command:
cargo generate --git https://github.com/esp-rs/esp-idf-template cargo

just make sure to select a version 5 esp idf in the prompts
This commit is contained in:
irriden
2023-06-15 17:05:46 +00:00
parent 6d99715239
commit f9c50853b1
6 changed files with 21 additions and 112 deletions

View File

@@ -1,36 +1,18 @@
[build] [build]
# Uncomment the relevant target for your chip here (ESP32, ESP32-S2, ESP32-S3 or ESP32-C3)
#target = "xtensa-esp32-espidf"
#target = "xtensa-esp32s2-espidf"
#target = "xtensa-esp32s3-espidf"
target = "riscv32imc-esp-espidf" target = "riscv32imc-esp-espidf"
[target.xtensa-esp32-espidf]
linker = "ldproxy"
[target.xtensa-esp32s2-espidf]
linker = "ldproxy"
[target.xtensa-esp32s3-espidf]
linker = "ldproxy"
[target.riscv32imc-esp-espidf] [target.riscv32imc-esp-espidf]
linker = "ldproxy" linker = "ldproxy"
# runner = "espflash --monitor" # Select this runner for espflash v1.x.x
# Future - necessary for the experimental "native build" of esp-idf-sys with ESP32C3 runner = "espflash flash --monitor" # Select this runner for espflash v2.x.x
# See also https://github.com/ivmarkov/embuild/issues/16 rustflags = ["--cfg", "espidf_time64", "-C", "default-linker-libraries"]
rustflags = ["-C", "default-linker-libraries"]
[unstable] [unstable]
build-std = ["std", "panic_abort"] build-std = ["std", "panic_abort"]
build-std-features = ["panic_immediate_abort"] # Required for older ESP-IDF versions without a realpath implementation
[env] [env]
# Note: these variables are not used when using pio builder # Note: these variables are not used when using pio builder (`cargo build --features pio`)
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF stable (v4.4) ESP_IDF_VERSION = "release/v5.0"
ESP_IDF_VERSION = { value = "tag:v4.4.2" }
# Enables the esp-idf-sys "native" build feature (`cargo build --features native`) to build against ESP-IDF master (mainline)
#ESP_IDF_VERSION = { value = "master" }
CC = { value = "../factory/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc", relative = true } CC = { value = "../factory/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc", relative = true }
CFLAGS = { value = "-fno-pic" } CFLAGS = { value = "-fno-pic" }
MCU = { value = "esp32c3" }

87
sphinx-key/Cargo.lock generated
View File

@@ -290,7 +290,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f83bc2e401ed041b7057345ebc488c005efa0341d5541ce7004d30458d0090b" checksum = "7f83bc2e401ed041b7057345ebc488c005efa0341d5541ce7004d30458d0090b"
dependencies = [ dependencies = [
"serde", "serde",
"toml 0.7.3", "toml",
] ]
[[package]] [[package]]
@@ -575,26 +575,6 @@ dependencies = [
"thiserror", "thiserror",
] ]
[[package]]
name = "dirs"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
dependencies = [
"dirs-sys",
]
[[package]]
name = "dirs-sys"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
dependencies = [
"libc",
"redox_users",
"winapi",
]
[[package]] [[package]]
name = "edge-executor" name = "edge-executor"
version = "0.3.0" version = "0.3.0"
@@ -683,26 +663,6 @@ dependencies = [
"strum_macros 0.23.1", "strum_macros 0.23.1",
] ]
[[package]]
name = "embuild"
version = "0.29.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd1dd6c90e28cfc361281a692320fcd820bcae71d327215e87c7d749bf8ddd26"
dependencies = [
"anyhow",
"bitflags",
"dirs",
"filetime",
"log",
"serde",
"serde_json",
"shlex",
"strum 0.24.1",
"thiserror",
"toml 0.5.11",
"xmas-elf",
]
[[package]] [[package]]
name = "embuild" name = "embuild"
version = "0.31.2" version = "0.31.2"
@@ -725,7 +685,7 @@ dependencies = [
"strum 0.24.1", "strum 0.24.1",
"tempfile", "tempfile",
"thiserror", "thiserror",
"toml 0.7.3", "toml",
"ureq", "ureq",
"which", "which",
] ]
@@ -795,7 +755,7 @@ dependencies = [
"embedded-hal 0.2.7", "embedded-hal 0.2.7",
"embedded-hal 1.0.0-alpha.10", "embedded-hal 1.0.0-alpha.10",
"embedded-hal-nb", "embedded-hal-nb",
"embuild 0.31.2", "embuild",
"enumset", "enumset",
"esp-idf-sys", "esp-idf-sys",
"heapless", "heapless",
@@ -811,7 +771,7 @@ dependencies = [
"anyhow", "anyhow",
"embassy-futures", "embassy-futures",
"embedded-svc", "embedded-svc",
"embuild 0.31.2", "embuild",
"enumset", "enumset",
"esp-idf-hal", "esp-idf-hal",
"esp-idf-sys", "esp-idf-sys",
@@ -831,7 +791,7 @@ dependencies = [
"build-time", "build-time",
"cargo_metadata", "cargo_metadata",
"const_format", "const_format",
"embuild 0.31.2", "embuild",
"envy", "envy",
"libc", "libc",
"regex", "regex",
@@ -1631,17 +1591,6 @@ dependencies = [
"bitflags", "bitflags",
] ]
[[package]]
name = "redox_users"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
dependencies = [
"getrandom",
"redox_syscall 0.2.16",
"thiserror",
]
[[package]] [[package]]
name = "regex" name = "regex"
version = "1.7.3" version = "1.7.3"
@@ -2010,7 +1959,7 @@ dependencies = [
"bitflags", "bitflags",
"embedded-hal 1.0.0-alpha.10", "embedded-hal 1.0.0-alpha.10",
"embedded-svc", "embedded-svc",
"embuild 0.29.3", "embuild",
"esp-idf-hal", "esp-idf-hal",
"esp-idf-svc", "esp-idf-svc",
"esp-idf-sys", "esp-idf-sys",
@@ -2229,15 +2178,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
[[package]]
name = "toml"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "toml" name = "toml"
version = "0.7.3" version = "0.7.3"
@@ -2756,21 +2696,6 @@ dependencies = [
"memchr", "memchr",
] ]
[[package]]
name = "xmas-elf"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d29b4d8e7beaceb4e77447ba941a7600d23d0319ab52da0461abea214832d5a"
dependencies = [
"zero",
]
[[package]]
name = "zero"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fe21bcc34ca7fe6dd56cc2cb1261ea59d6b93620215aefb5ea6032265527784"
[[package]] [[package]]
name = "zeroize" name = "zeroize"
version = "1.6.0" version = "1.6.0"

View File

@@ -2,8 +2,9 @@
name = "sphinx-key" name = "sphinx-key"
version = "0.1.0" version = "0.1.0"
authors = ["Evan Feenstra <evanfeenstra@gmail.com>"] authors = ["Evan Feenstra <evanfeenstra@gmail.com>"]
edition = "2018" edition = "2021"
resolver = "2" resolver = "2"
rust-version = "1.66"
[profile.release] [profile.release]
opt-level = "s" opt-level = "s"
@@ -41,8 +42,7 @@ hex = "0.4.3"
rmp-serde = "1.1.0" rmp-serde = "1.1.0"
[build-dependencies] [build-dependencies]
embuild = "0.29" embuild = "0.31.2"
anyhow = "1"
[[bin]] [[bin]]
name = "clear" name = "clear"

View File

@@ -1,5 +1,6 @@
// Necessary because of this issue: https://github.com/rust-lang/cargo/issues/9641 // Necessary because of this issue: https://github.com/rust-lang/cargo/issues/9641
fn main() -> anyhow::Result<()> { fn main() -> Result<(), Box<dyn std::error::Error>> {
embuild::build::CfgArgs::output_propagated("ESP_IDF")?; embuild::build::CfgArgs::output_propagated("ESP_IDF")?;
embuild::build::LinkArgs::output_propagated("ESP_IDF") embuild::build::LinkArgs::output_propagated("ESP_IDF")?;
Ok(())
} }

View File

@@ -1,3 +1,3 @@
[toolchain] [toolchain]
channel = "nightly"
channel = "nightly-2022-10-20" components = ["rust-src"]

View File

@@ -58,6 +58,7 @@ pub fn mount_sd_card() -> anyhow::Result<()> {
format_if_mount_failed: false, format_if_mount_failed: false,
max_files: 5, max_files: 5,
allocation_unit_size: 16 * 1024, allocation_unit_size: 16 * 1024,
disk_status_check_enable: false,
}; };
let mut card: *mut sdmmc_card_t = ptr::null_mut(); let mut card: *mut sdmmc_card_t = ptr::null_mut();