Skip to content

Commit 01d8ea0

Browse files
authored
ESP32C6 algo support (#2)
1 parent a478f1e commit 01d8ea0

File tree

8 files changed

+628
-64
lines changed

8 files changed

+628
-64
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ log = ["ufmt"]
1414

1515
# targets
1616
esp32c3 = []
17+
esp32c6 = []
1718

1819
[profile.release]
1920
codegen-units = 1
2021
debug = false
2122
debug-assertions = false
2223
incremental = false
2324
lto = "fat"
24-
opt-level = 's'
25+
opt-level = 'z'
2526
overflow-checks = false

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ $ target-gen elf target/riscv32imc-unknown-none-elf/release/esp-flashloader outp
2121
|name |supported|
2222
|-------|---------|
2323
|esp32c3| Y |
24+
|esp32c6| Y |
2425

2526
## Adding new chips
2627

build.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@ fn main() {
99
println!("cargo:rerun-if-changed=ld/loader.x");
1010

1111
#[cfg(feature = "esp32c3")]
12+
let chip = "esp32c3";
13+
#[cfg(feature = "esp32c6")]
14+
let chip = "esp32c6";
15+
16+
1217
{
13-
fs::copy("ld/esp32c3.x", out_dir.join("esp32c3.x")).unwrap();
14-
println!("cargo:rerun-if-changed=ld/esp32c3.x");
15-
println!("cargo:rustc-link-arg=-Tld/esp32c3.x");
18+
fs::copy(format!("ld/{}.x", chip), out_dir.join(format!("{}.x", chip))).unwrap();
19+
println!("cargo:rerun-if-changed=ld/{}.x", chip);
20+
println!("cargo:rustc-link-arg=-Tld/{}.x", chip);
1621
}
1722
}

0 commit comments

Comments
 (0)