メインコンテンツまでスキップ
バージョン: Next

Set up your environment

Linux not supported

BlueScript supports macOS and Windows. Linux is not supported at this time.

In this guide, we will install the BlueScript CLI and flash the runtime environment to your ESP32 microcontroller.

Prerequisites

Hardware

  • Host PC: macOS or Windows
  • Microcontroller: An ESP32 development board (e.g., ESP32-DevKitC)
  • USB cable to connect your host PC and the microcontroller

Software


Step 1: Install the CLI

BlueScript provides a command-line interface (CLI) to manage projects and communicate with your device.

Verify the installation:

bscript --version

Step 2: Board Setup

Because BlueScript uses a Disaggregated VM architecture, you need to install the lightweight Runtime onto your microcontroller.

One-Time Setup

The USB cable is only required for this step (flash-runtime). Once this is done, you can disconnect the cable and use Bluetooth for daily development.

1. Download Platform Tools

Download the necessary environment files for the ESP32 platform:

bscript board setup esp32

2. Flash the Runtime

Connect your ESP32 to your computer via USB and flash the runtime:

bscript board flash-runtime esp32

The CLI will display a list of detected serial ports. Use the arrow keys to select the one corresponding to your ESP32 (e.g., /dev/tty.usbserial-xxxx on macOS or COMX on Windows).

Device not found?

If your device does not appear in the list, you may need to install USB-to-UART drivers (e.g., CP210x or FTDI).

See also Establish Serial Connection with ESP32.

If the flash is successful, your device is now ready to receive BlueScript code wirelessly!

No microcontroller?

If you want to try BlueScript without hardware, see Try Without Microcontroller.