boxlang-runtime-esp32listed
Install: claude install-skill ortus-boxlang/skills
# BoxLang on ESP32
## Overview
MatchBox can compile and deploy BoxLang scripts directly to **ESP32 microcontrollers** using `--target esp32`. BoxLang runs on FreeRTOS with a custom task stack, and bytecode is stored in a dedicated flash partition. Full firmware flashing is only needed on first setup; subsequent deploys update only the bytecode (~1 second).
---
## Prerequisites
```bash
# Install the ESP-IDF prerequisites (see espressif.com/getting-started)
# Install the Rust ESP32 toolchain
cargo install espup
espup install
# Install espflash (requires 3.3.0+)
cargo install espflash@3.3.0
```
---
## First Flash (Full Firmware)
The first deploy installs the BoxLang firmware onto the device:
```bash
matchbox app.bxs --target esp32 --chip esp32s3 --full-flash
```
- `--full-flash` installs the full firmware (bootloader, partition table, and ByteCode VM)
- Only needed on first use or firmware upgrades
- Takes 30–60 seconds
---
## Fast Deploy (Bytecode Only)
After the firmware is installed, subsequent deploys update only the bytecode partition:
```bash
matchbox app.bxs --target esp32 --chip esp32s3 --flash
```
- Updates only the `storage` partition at `0x110000`
- Takes ~1 second
- No firmware reinstall needed
---
## Watch Mode (Auto-Recompile + Reflash)
Use `--watch` for rapid iteration during development:
```bash
matchbox app.bxs --target esp32 --chip esp32s3 --flash --watch
```
- Watches `.bxs` files for changes
- Automatically recompiles and reflashes on sa