mise.toml now owns the ESP cross-toolchain end to end: - [env] pins PATH (xtensa-esp-elf-gcc bin) and LIBCLANG_PATH so any `mise exec` (which the justfile already uses for `set shell`) resolves the linker without sourcing espup's stray ~/export-esp.sh. - [tasks.esp-install] installs the matching crosstool version via espup (espup hardcodes ~/.rustup/toolchains/esp/ -- there is no --prefix flag -- so the binaries necessarily live there, but the project now declaratively owns the version + path knowledge). - cargo:espup pinned to 0.17.1 to match the [env] paths. Triggered by a real failure: ~/export-esp.sh was moved to Trash and the ESP build broke with `linker xtensa-esp32s3-elf-gcc not found`. The previous setup silently no-op'd `[ -f $HOME/export-esp.sh ] && . $HOME/export-esp.sh` in justfile, leaving the build with no PATH for the cross-toolchain. Encoding the paths in mise.toml removes the stray-file dependency. justfile changes: - _cargo: drop the `[ -f $HOME/export-esp.sh ] && . ...` source. - setup / _require_esp_toolchain: install via `mise run esp-install` instead of bare `espup install`, so the version pin and the [env] paths stay in sync from a single source. Bumping ESP versions remains a two-touch change: edit the version dirs in BOTH [tasks.esp-install] and [env], then re-run the task.
47 lines
2.3 KiB
TOML
47 lines
2.3 KiB
TOML
[tools]
|
|
just = "latest"
|
|
|
|
# Cargo-installed tooling via mise's `cargo:` backend.
|
|
"cargo:cargo-binutils" = "latest" # rust-objcopy, rust-size
|
|
"cargo:cargo-hex-to-uf2" = "latest" # ELF → UF2 for nRF52 / RP2040 DFU drives
|
|
"cargo:espup" = "0.17.1" # ESP Xtensa toolchain installer (pinned: [env] paths below match this version's defaults)
|
|
"cargo:espflash" = "3" # flash + save-image for ESP targets (4.x requires esp_app_desc!() in app — revisit alongside esp-hal 1.1+ / drop-the-patches cleanup)
|
|
"cargo:probe-rs-tools" = "latest" # debug-probe flash/run for ARM targets
|
|
|
|
# Stable Rust + cross-compile targets. Targets land under $RUSTUP_HOME for
|
|
# the pinned toolchain, so they're always available under `mise exec` — no
|
|
# extra `rustup target add` step at setup time.
|
|
#
|
|
# Xtensa ESP targets are NOT listed here — they use the self-contained `esp`
|
|
# toolchain populated by `mise run esp-install` (see [tasks] below). That
|
|
# toolchain ships its own rust-src for `-Zbuild-std`.
|
|
#
|
|
# profile = "minimal" (just rustc, rust-std, cargo), "default" (adds rust-docs, rustfmt, clippy)
|
|
#
|
|
[tools.rust]
|
|
version = "1.94"
|
|
profile = "default"
|
|
targets = "thumbv6m-none-eabi,thumbv7em-none-eabihf"
|
|
|
|
# ESP Xtensa toolchain. `cargo:espup` above only installs the *installer*;
|
|
# the actual rustc-esp + xtensa-esp-elf-gcc + esp-clang toolchains are
|
|
# populated by `mise run esp-install` (or `just setup`).
|
|
#
|
|
# espup hardcodes its install root to ~/.rustup/toolchains/esp/ — there's
|
|
# no --prefix or --install-dir flag — so the binaries necessarily live
|
|
# there. The [env] block below pins the exact PATH and LIBCLANG_PATH so
|
|
# every `mise exec` (which the justfile uses for `set shell`) resolves
|
|
# the cross-toolchain without depending on espup's stray ~/export-esp.sh.
|
|
#
|
|
# Bumping versions: edit the version dirs in BOTH [tasks.esp-install] (so
|
|
# espup installs the matching crosstool) AND [env] (so the path resolves).
|
|
[env]
|
|
_.path = [
|
|
"{{env.HOME}}/.rustup/toolchains/esp/xtensa-esp-elf/esp-15.2.0_20250920/xtensa-esp-elf/bin",
|
|
]
|
|
LIBCLANG_PATH = "{{env.HOME}}/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-20.1.1_20250829/esp-clang/lib"
|
|
|
|
[tasks.esp-install]
|
|
description = "Install the ESP Xtensa toolchain (rustc-esp + GCC + clang) at versions matching [env]"
|
|
run = "espup install --crosstool-toolchain-version esp-15.2.0_20250920"
|