Skip to main content

Run on your board

Everything you need to put Kog on a real device lives on this page — no CLI, no Python, no local toolchain. The editor below compiles in your browser; the simulator shows the result instantly; and if you plug in a blessed board, the same edit flashes and hot-reloads onto the hardware over Web Serial.

:::info Chrome or Edge Web Serial is a Chromium API, so flashing and the live dev-link need Chrome or Edge on desktop. In any other browser the editor and simulator still work — you just won't see the "Your board" controls light up. :::

The three steps

  1. Connect a board. Click Connect a board and pick your device's serial port. Browsers require this to be a click you make — a page can never open a port on its own.
  2. Flash firmware. Flash firmware reads the chip, matches it to a blessed board, downloads the verified image (each part is checked against its SHA-256 before it's written), and writes only the firmware's own flash regions — your files and settings elsewhere on the chip are left alone.
  3. Open the dev-link. Once firmware is running, Open dev-link handshakes with the device (checking the ABI and bytecode version match this page's compiler). After that, every edit hot-reloads onto the board — the editor compiles to QuickJS bytecode and pushes it over the same serial connection, and the board's console.log and errors stream back into the device console.

What's happening under the hood

The browser does the whole toolchain. Your TSX is bundled to an ES module by the in-page compiler, then compiled to raw QuickJS bytecode by the same WebAssembly runtime that powers the simulator — so the bytecode the board runs is byte-for-byte what the simulator validated. Flashing uses esptool-js; the dev-link speaks a small framed protocol over the board's USB serial. It's all in @kog/weblink — a framework-agnostic package, so the same engine can drive a future standalone IDE.

:::note Unsigned dev bundles Blessed development firmware runs unsigned bundles so the browser can hot-reload freely. Production/OTA is a separate, signed path — a device provisioned with an OTA key refuses unsigned pushes by design. See OTA. :::

Prefer a wire? The flash-your-board and hot-reload guides cover the CLI path and wireless dev.