TinyC for Tasmota¶
TinyC is a C-subset compiler and VM that runs on ESP32 and ESP8266 as the Tasmota driver XDRV_124. Write C in the browser IDE, compile to portable bytecode, upload and run — no firmware rebuild, no on-device compiler.
Why TinyC¶
- Portable bytecode — compile once, run the same binary on ESP32, ESP32-S3, ESP32-C3, or ESP8266.
- No on-device compiler — the VM is ~12 KB of flash. Compilation happens in the browser.
- Familiar C syntax —
int,float, arrays, functions,for/while/if— no new language. - 10× faster than script interpreters — direct-threaded bytecode dispatch with no source re-parsing.
- True background tasks —
TaskLoop()runs in a dedicated FreeRTOS task (ESP32) with fulldelay()support. - Deep Tasmota integration — direct access to SML, I2C, display drivers, HomeKit, UDP multicast, webcalls.
Start here¶
-
Enable
USE_TINYCin your build, upload the IDE, write your first program. -
Full function reference — GPIO, I2C, SML, display, HomeKit, networking.
-
Ready-to-run programs for sensors, displays, meters, and more.
-
Screenshots of real projects running on Tasmota hardware.
-
Download pre-built firmware for testing.
-
Feature flags for trimmed or extended firmware variants.
Latest release¶
The latest test firmware, IDE bundle, and docs are always on the testing release tag.
Not affiliated with TCC / TinyCC
TinyC for Tasmota is an independent project unrelated to Fabrice Bellard's Tiny C Compiler (TCC / TinyCC). The two share a similar name but are different projects with different scope: TCC is a native x86/ARM C compiler, while TinyC for Tasmota is a C-subset compiler that targets a portable bytecode VM running inside Tasmota on ESP32/ESP8266.
