Skip to content

Building from Source

Most Tasmota users should install the project's official release images — they are built by the project's own automation and signed off by its maintainers. But building the firmware yourself is a normal, supported thing to do: it is how variants and compile-time features are chosen, how the project is developed, and — for the purposes of this guide — how you verify what the firmware is. This chapter is the lab's own work, done for real: the full transcripts are in tasmota-lab/transcripts/.

The setup

The lab cloned the project at its current stable release and built with the project's own toolchain definition:

git clone --depth 1 --branch v16.0.0 https://github.com/arendst/Tasmota.git

Release: v16.0.0, commit 1c2173927cdf1be61759bcc3b064b9511a18e5d7. The build system is PlatformIO (Core 6.2.0 in the lab's virtual environment); the project's two platformio_tasmota_env*.ini files define the variant environments from the earlier chapter, and one command builds one environment:

pio run -e tasmota      # ESP8266, full build
pio run -e tasmota32    # ESP32, full build

Everything else — compilers, frameworks, libraries — PlatformIO downloads and pins from the project's own configuration. Expect the first build to take a while (the lab's ESP8266 build took about 15 minutes on a shared, busy machine; the ESP32 build, roughly a thousand objects plus the ESP-IDF framework, took longer, and its transcript notes a rerun — builds are incremental, so very little work was lost).

The ESP8266 build

RAM:   [=====     ]  51.2% (used 41928 bytes from 81920 bytes)
Flash: [======    ]  64.7% (used 662892 bytes from 1023984 bytes)
Used static IRAM: 30528 bytes (2240 remain, 93.2% used)
======================== [SUCCESS] ========================

The deliverables land in build_output/: tasmota.bin at 667,040 bytes and a compressed tasmota.bin.gz at 469,166 bytes. Read those percentages the way the two-chip-families chapter promised: this is a complete, feature-rich firmware that has already used two-thirds of a 1 MB flash — the variant shelf and the minimal stepping stone exist because of this table.

The ESP32 build

RAM:   [==        ]  23.8% (used 78032 bytes from 327680 bytes)
Flash: [========  ]  75.8% (used 2234363 bytes from 2949120 bytes)
======================== [SUCCESS] ========================

tasmota32.bin is 2,234,928 bytes, and the build also emits tasmota32.factory.bin (3,152,432 bytes) — the full-flash image, bootloader and partitions included, that the installing chapter writes at address 0x0 for a first install. The flash percentage is of the ~2.9 MB application partition; even the "big" build uses a smaller share of its RAM (23.8% against 51.2%) than the ESP8266 build, which is the headroom difference in one comparison.

The ESP32 build output also shows its extras in plain sight: the dependency list includes Berry, the Berry Tasmota mapping and the Berry libraries, and the compiler visibly builds the interpreter's own source files. Dissecting the finished images (strings) closes the loop from the Berry chapter: the ESP32 image contains the Berry scripting console's web page, a "Berry":{…} status fragment and a solidified Berry boot script; the ESP8266 image contains the word "Berry" exactly once, inside a shared feature-name table — the name in a list, with no interpreter behind it.

What a build proves, and what it doesn't

A successful build proves the source is what it claims to be, that the images in this guide's chapters match real artefacts, and that the sizes and percentages quoted are measured, not marketing. It does not prove the firmware works on a device — the lab has none — which is why the hardware chapters of this guide are labelled documented-only, and why you should still prefer official release images for devices in your walls: they are this same source, built and tested by the people who wrote it.