[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"

[target.'cfg(all(any(target_arch = "riscv32", target_arch = "xtensa"), target_os = "none"))']
runner = "espflash flash --monitor"
rustflags = [
  # Needed for esp-hal to work
  "-C", "link-arg=-Tlinkall.x",
  # Needed for defmt to work
  "-C", "link-arg=-Tdefmt.x",
]

[env]
DEFMT_LOG="info"

[build]
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",
]

target = "riscv32imc-unknown-none-elf"

[unstable]
build-std = ["alloc", "core"]
