timer works properly well

This commit is contained in:
Priec
2025-10-15 11:17:03 +02:00
parent 200f37d794
commit 8af5dcbede
3 changed files with 51 additions and 23 deletions

View File

@@ -21,29 +21,37 @@
gcc
gnumake
rustup
rust-analyzer
cargo-espflash
espup
mosquitto
];
shellHook = ''
echo ">>> ESP32 DevShell (esp-hal only)"
echo ">>> ESP32 DevShell (esp-hal only)"
if [ ! -d "$HOME/.espup" ]; then
echo "Running espup install..."
espup install
fi
if [ ! -d "$HOME/.espup" ]; then
echo "Running espup install..."
espup install
fi
# Activate Xtensa Rust toolchain
export RUSTUP_TOOLCHAIN=esp
# Ensure the real rust-analyzer from Nix is used (not rustup's shim)
export PATH=${pkgs.rust-analyzer}/bin:$PATH
# Keep ESP toolchain binaries on PATH for building/flashing
# (do NOT set RUSTUP_TOOLCHAIN=esp globally; that breaks rust-analyzer)
export PATH=$HOME/.rustup/toolchains/esp/bin:$PATH
# Add GCC/binutils path for xtensa-esp32-elf-gcc
export PATH=$HOME/.rustup/toolchains/esp/xtensa-esp-elf/esp-14.2.0_20240906/xtensa-esp-elf/bin:$PATH
# Helpers that force the ESP toolchain explicitly when needed
alias cargo-esp="RUSTUP_TOOLCHAIN=esp cargo"
alias rustc-esp="RUSTUP_TOOLCHAIN=esp rustc"
# Add GCC/binutils path for xtensa-esp32-elf-gcc
export PATH=$HOME/.rustup/toolchains/esp/xtensa-esp-elf/esp-14.2.0_20240906/xtensa-esp-elf/bin:$PATH
echo "Xtensa Rust toolchain ready."
rustc --version
which xtensa-esp32-elf-gcc || echo " xtensa-esp32-elf-gcc not found in PATH"
echo "Xtensa Rust toolchain ready."
rustc --version
which xtensa-esp32-elf-gcc || echo " xtensa-esp32-elf-gcc not found in PATH"
'';
};
};