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.

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, but the "Your board" controls won't light up.

The three steps​

  1. Connect a board. Click Connect a board and pick your device's serial port. Browsers require you to make this click yourself; a page can never open a port on its own.
  2. Flash firmware. Flash firmware reads the chip, matches it to a blessed board, and downloads the verified image (each part is checked against its SHA-256 before it's written). It also resets saved board settings, including Wi-Fi, and enables live development even after a standalone app install. The board restarts when flashing finishes. On a CYD the page asks which panel generation you have, because the two share one chip and can't be told apart over USB. Pick the standard one first. If the screen comes up left/right mirrored with orange-instead-of-blue UI, flash again and pick the classic panel instead.
  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 MQuickJS 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 and lowered to a self-contained ES5 script by the in-page compiler, then compiled to raw MQuickJS 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.

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 the CLI? The flash-your-board and hot-reload guides cover it. (The CLI also works over USB; there's no wireless dev path.)