-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #201 from bytedream/esp32-example-improvements
Update esp32 example for non esp32c3 targets
- Loading branch information
Showing
5 changed files
with
45 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
[target.riscv32imc-unknown-none-elf] | ||
runner = "espflash flash --monitor" | ||
|
||
[alias] | ||
esp32 = "run --release --no-default-features --features=esp32 --target=xtensa-esp32-none-elf" | ||
esp32c2 = "run --release --no-default-features --features=esp32c2 --target=riscv32imc-unknown-none-elf" | ||
esp32c3 = "run --release --no-default-features --features=esp32c3 --target=riscv32imc-unknown-none-elf" | ||
esp32c6 = "run --release --no-default-features --features=esp32c6 --target=riscv32imac-unknown-none-elf" | ||
esp32h2 = "run --release --no-default-features --features=esp32h2 --target=riscv32imac-unknown-none-elf" | ||
esp32s3 = "run --release --no-default-features --features=esp32s3 --target=xtensa-esp32s3-none-elf" | ||
|
||
[env] | ||
ESP_LOG = "info" | ||
[target.'cfg(all(any(target_arch = "riscv32imc", target_arch = "riscv32imac", target_arch = "xtensa"), target_os = "none"))'] | ||
runner = "espflash flash --monitor" | ||
|
||
[build] | ||
# Pick ONE of these compilation targets | ||
# target = "xtensa-esp32-none-elf" # ESP32 | ||
# target = "xtensa-esp32s3-none-elf" # ESP32-S3 | ||
target = "riscv32imc-unknown-none-elf" # ESP32-C2 and ESP32-C3 | ||
# target = "riscv32imac-unknown-none-elf" # ESP32-C6 and ESP32-H2 | ||
|
||
rustflags = [ | ||
# Required to obtain backtraces (e.g. when using the "esp-backtrace" crate.) | ||
# NOTE: May negatively impact performance of produced code | ||
"-C", | ||
"force-frame-pointers", | ||
"-C", "force-frame-pointers", | ||
] | ||
|
||
target = "riscv32imc-unknown-none-elf" | ||
|
||
[unstable] | ||
build-std = ["core"] | ||
build-std = ["alloc", "core"] | ||
|
||
[env] | ||
ESP_LOG = "info" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
fn main() { | ||
println!("cargo:rustc-link-arg-bins=-Tlinkall.x"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters