Download scripts/setup.sh from HelloSun/esp32emu: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/spaces/HelloSun/esp32emu/resolve/main/scripts/setup.sh
- Command line
-
hf download hf://spaces/HelloSun/esp32emu/scripts/setup.sh
-
curl -L -o setup.sh https://huggingface.co/spaces/HelloSun/esp32emu/resolve/main/scripts/setup.sh
1.35 kB
| # One-time toolchain setup (Linux, python3 + node >= 18 required). Installs everything into ./.toolchain | |
| set -e | |
| cd "$(dirname "$0")/.."; ROOT=$PWD; TC=$ROOT/.toolchain; mkdir -p $TC | |
| pip install -q ziglang pillow huggingface_hub pyserial cryptography bitstring ecdsa reedsolo pyyaml intelhex playwright | |
| # arduino-cli + ESP32 core 2.0.17 + FabGL (only needed to rebuild firmware) | |
| curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=$TC sh | |
| export ARDUINO_DIRECTORIES_DATA=$TC/ard ARDUINO_DIRECTORIES_USER=$TC/ardu PATH=$TC:$PATH | |
| arduino-cli config init --overwrite >/dev/null | |
| arduino-cli config add board_manager.additional_urls https://espressif.github.io/arduino-esp32/package_esp32_index.json | |
| arduino-cli core update-index | |
| arduino-cli core install esp32:esp32@2.0.17 | |
| arduino-cli lib install FabGL@1.0.9 | |
| # ESP32 ROM images (from the Espressif QEMU release); skipped if already present | |
| if [ ! -f web/rom/esp32-v3-rom.bin ]; then | |
| mkdir -p web/rom | |
| U=https://github.com/espressif/qemu/releases/download/esp-develop-9.2.2-20260417/qemu-xtensa-softmmu-esp_develop_9.2.2_20260417-x86_64-linux-gnu.tar.xz | |
| curl -fsSL $U | tar -xJ -C $TC qemu/share/qemu/esp32-v3-rom.bin qemu/share/qemu/esp32-v3-rom-app.bin | |
| cp $TC/qemu/share/qemu/esp32-v3-rom*.bin web/rom/ | |
| fi | |
| echo "setup done. Next: scripts/build.sh" | |