HomeElectronics NewsKryonOS Runs JavaScript Apps On ESP32 With A Touchscreen

KryonOS Runs JavaScript Apps On ESP32 With A Touchscreen

KryonOS adds a touch-driven graphical desktop and JavaScript runtime to the ESP32, allowing applications to be installed over Wi-Fi without reflashing the operating system.

Close view of the KryonOS launcher listing App Store, App Installer, Settings and Help Center
KryonOS’s built-in App Store and installer. (Image: Haris16-code/KryonOS)

An ESP32 can now run a graphical desktop, browse files from a microSD card and install JavaScript applications over Wi-Fi using KryonOS, an open-source operating system and application runtime developed by Haris. The project separates the operating system from applications, allowing the firmware to remain installed while individual applications are added or replaced independently.

This differs from the usual ESP32 development workflow, where an application and its supporting firmware are compiled into a single binary. Changing the functionality generally requires a new build and firmware flash. KryonOS instead treats the ESP32 firmware as the operating system, while applications are provided as JavaScript files that can be installed and launched afterwards.

The project supports ESP32-WROOM-32, ESP32-S2, ESP32-S3 and ESP32-C3 variants listed in its repository. A typical hardware setup uses a 2.8-inch ILI9341 TFT display with an XPT2046 resistive touch controller, a microSD card module and a suitable ESP32 development board. The display provides the graphical interface, while the microSD card stores the file system and installed applications.

KryonOS uses Duktape as its embedded JavaScript engine. This allows JavaScript applications to execute directly on the microcontroller rather than requiring them to be compiled into separate native firmware images. Applications can access hardware through APIs provided by the operating system, including general-purpose input/output (GPIO), touch input, sensors and microSD card functions.

The graphical interface uses double buffering to reduce visible tearing during screen updates. The project also separates the display and microSD card communications across two SPI buses. The display and touch controller use VSPI, while the card reader uses HSPI. This architecture separates the graphics and storage traffic instead of forcing both peripherals to share the same SPI bus.

KryonOS also includes an application store that can download applications over Wi-Fi. Once the operating system is installed, a user can connect the ESP32 to a network, open the application store and install an application without rebuilding or reflashing the firmware. Applications can also be stored on the microSD card and launched through the file explorer.

The project can be built around hardware compatible with the ESP32 Marauder versions 4, 6 and 6.1 pin arrangements. For compatible boards, the required wiring can therefore follow the existing pin configuration documented by the project. Other ESP32 boards require the display and SD-card connections to be wired according to their available SPI interfaces.

Getting the system running involves connecting the display to the VSPI interface and the microSD module to HSPI, preparing the card and flashing the KryonOS firmware. The firmware can be installed using precompiled binaries with esptool.py or built from source using PlatformIO. After booting, the resistive touchscreen needs calibration before the board is connected to Wi-Fi and used to download an application.

A developer can then create a JavaScript application, place it on the microSD card and launch it through the operating system. This creates a separation between the base firmware and the application layer, allowing several applications to coexist and be switched between without replacing the operating system.

The source code is available in the Haris16-code/KryonOS repository under the GNU General Public License version 3 (GPLv3). This is relevant for anyone planning to distribute modified versions of the software, as derivative works are subject to the licence’s requirements, including its copyleft provisions.

The project does have practical limitations. Resistive touchscreens generally require calibration and do not provide the same interaction characteristics as capacitive panels. The SPI interface also limits display bandwidth, while JavaScript execution through an interpreter introduces overhead compared with applications written directly in native C or C++. The project documentation also lists several ESP32 variants, but the availability and level of testing can differ between them.

The repository does not currently provide published measurements for parameters such as display frame rate, free heap after the operating system boots, maximum application size or Duktape execution speed. These figures would help establish how much processing and memory headroom remains for applications running alongside the graphical environment.

For Indian students and makers, the project provides a relatively accessible way to experiment with embedded software using JavaScript rather than building every application as a monolithic firmware image. ESP32 boards, ILI9341 displays and microSD modules are widely used in educational and maker projects, making the hardware combination suitable for experimenting with embedded graphics, storage, networking and interpreted applications.

The architecture could also be extended to different display hardware or application types. A capacitive touchscreen such as an ST7789-based panel could provide a different user interface, while measuring remaining heap and application performance would show how much capacity is available for more complex software.

KryonOS therefore turns the ESP32 into something closer to an application-oriented embedded platform: the operating system stays on the device while JavaScript applications can be added, removed and updated separately. For developers familiar with JavaScript, it offers another route into microcontroller programming without requiring every application change to begin with a firmware rebuild.

For more information, click here.

Loading form…
Ananthu Ashok
Ananthu Ashok
Ananthu Ashok is a tech journalist and has a deep interest in embedded systems, open source, IoT, robotics and emerging tech.

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Electronics News

Truly Innovative Electronics

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics