fix: get Heltec V3 (ESP32-S3) building with esp toolchain

Use nightly cargo + esp rustc (RUSTC override) + -Zbuild-std=core for
Xtensa targets. This avoids the esp cargo's inability to parse modern
crate manifests (edition 2024) while still using esp's LLVM with full
Xtensa support.

Pin proc-macro-crate to 3.2.0 to avoid transitive deps requiring
rustc 1.85+.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Opus 4.6 committed 2026-03-29 20:42:54 -06:00
1 parent 3102fc747a
commit 8649b2ec46
2 files changed
+17 -55

No files matched your search

+10 -9
View File
@@ -1,8 +1,8 @@
set shell := ["bash", "-c"]
# Board definitions: feature target chip
# Xtensa targets require the esp toolchain (espup); check-all gracefully skips
# boards whose toolchain isn't installed.
# Xtensa targets use nightly cargo + esp rustc + -Zbuild-std=core.
# check-all gracefully skips boards whose toolchain isn't installed.
heltec_v3 := "heltec_v3 xtensa-esp32s3-none-elf esp32s3"
rak_4631 := "rak_4631 thumbv7em-none-eabihf nRF52840_xxAA"
@@ -29,9 +29,9 @@ check board:
# Run clippy on a single board
clippy board:
@read -r feat target chip <<< "$(just _info {{board}})"; \
tc=""; \
case "$target" in xtensa-*) tc="+esp" ;; esac; \
cargo $tc clippy --target $target --features $feat -- -D warnings
env=""; extra=""; \
case "$target" in xtensa-*) env="RUSTC=$(rustup which rustc --toolchain esp)"; extra="+nightly -Zbuild-std=core";; esac; \
eval $env cargo $extra clippy --target $target --features $feat -- -D warnings
# Build release firmware and copy to firmware/ with a readable name
build board profile="release":
@@ -50,13 +50,14 @@ size board:
# ── Private helpers ───────────────────────────────────────────────────
# Run a cargo command for a board, using +esp toolchain for Xtensa targets
# Run a cargo command for a board.
# Xtensa: nightly cargo + esp rustc (via RUSTC override) + -Zbuild-std=core
[private]
_cargo board cmd:
@read -r feat target chip <<< "$(just _info {{board}})"; \
tc=""; \
case "$target" in xtensa-*) tc="+esp" ;; esac; \
cargo $tc {{cmd}} --target $target --features $feat
env=""; extra=""; \
case "$target" in xtensa-*) env="RUSTC=$(rustup which rustc --toolchain esp)"; extra="+nightly -Zbuild-std=core";; esac; \
eval $env cargo $extra {{cmd}} --target $target --features $feat
# Check if a board's toolchain is available
[private]