From 82bc9ed66d4b90b89d487093621a945b9d40852a Mon Sep 17 00:00:00 2001 From: Empire Phoenix Date: Sun, 21 Apr 2024 20:17:08 +0200 Subject: [PATCH] compiler adjustments for c6 --- rust/.cargo/config.toml | 5 +++-- rust/Cargo.toml | 26 +++++++++----------------- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/rust/.cargo/config.toml b/rust/.cargo/config.toml index b2b10da..ccee90a 100644 --- a/rust/.cargo/config.toml +++ b/rust/.cargo/config.toml @@ -6,8 +6,8 @@ target = "riscv32imac-esp-espidf" linker = "ldproxy" #runner = "espflash flash --monitor --partition-table partitions.csv" # Select this runner for espflash v2.x.x # runner = espflash erase-parts otadata -runner = "espflash flash --monitor --baud 921600 --partition-table partitions.csv" # Select this runner for espflash v2.x.x -#runner = "cargo runner" + runner = "espflash flash --monitor --baud 921600 --partition-table partitions.csv" # Select this runner for espflash v2.x.x +# runner = "cargo runner" rustflags = [ "--cfg", "espidf_time64"] # Extending time_t for ESP IDF 5: https://github.com/esp-rs/rust/issues/110 [target.xtensa-esp32-espidf] @@ -27,3 +27,4 @@ MCU="esp32c6" ESP_IDF_VERSION = "v5.1.1" CHRONO_TZ_TIMEZONE_FILTER="UTC|Europe/Berlin" CARGO_WORKSPACE_DIR = { value = "", relative = true } +RUST_BACKTRACE = "full" \ No newline at end of file diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 8024b0c..1404aa5 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -6,26 +6,18 @@ edition = "2021" resolver = "2" rust-version = "1.71" -[profile.release] -# Explicitly disable LTO which the Xtensa codegen backend has issues -#lto = "thin" -opt-level = "s" -strip = false -#codegen-units = 1 -debug = true -overflow-checks = true -panic = "unwind" -incremental = true - [profile.dev] # Explicitly disable LTO which the Xtensa codegen backend has issues -#lto = "thin" -opt-level = "s" +lto = true strip = false -#codegen-units = 1 -debug = true +debug = false overflow-checks = true -panic = "unwind" +panic = "abort" +incremental = true +opt-level = "s" + +[profile.dev.build-override] +opt-level = 1 incremental = true [package.metadata.cargo_runner] @@ -35,7 +27,7 @@ command = [ "espflash", "save-image", "--chip", - "esp32", + "esp32c6", "image.bin" ]