README
On this page
ESP32 BoxLang Example
This example demonstrates how to compile and flash a simple BoxLang script to an ESP32 microcontroller.
Running the Example
- Connect your ESP32 device to your computer via USB.
- Identify your chip type (e.g.,
esp32s3,esp32c3, or standardesp32). - Run the following command (replacing
esp32s3with your chip type):
matchbox docs/examples/esp32/hello_esp32.bxs --target esp32 --chip esp32s3 --full-flash
What Happens Next?
- MatchBox will compile the BoxLang script into bytecode.
- It will then compile a custom ESP32 firmware binary that includes the MatchBox VM and your script.
espflashwill be invoked to send the binary to your device.- Once flashed, you can monitor the serial output:
espflash monitor
You should see the "Hello from ESP32!" message and the loop iterations in your terminal.