Repository navigation
Release v2.1.3
Tetris Clock ESP32 Firmware
Version: v2.1.3
Build date: 2026-11-03T22:54:25+01:00
Which files do I need?
| Board flash | Build | Download |
|---|---|---|
| 4MB | π Release (optimized) | tetris-clock_v2.1.3_release_4mb.zip |
| 16MB | π Release (optimized) | tetris-clock_v2.1.3_release_16mb.zip |
Each zip contains everything needed for a first install over USB: the four flash
images and a ready-to-run flash_<variant>.bat. Not sure about the flash size?
python -m esptool flash-id prints it (Detected flash size: ...).
Already running the clock? Update from the Android app instead and keep your settings:
over BLE (the app sends the *_fw.bin file), or β firmware v2.0.0 and later with WiFi set
up β the clock downloads it itself (manifest.json tells it which file).
First install on Windows (from scratch)
- Install Python 3 from https://www.python.org/downloads/ β in the installer tick
"Add python.exe to PATH". - Install esptool β open a command prompt (
Win+Rβcmd) and run:The second command must print the esptool version (5.x).python -m pip install --upgrade esptool python -m esptool version
- Connect the board with a USB data cable. It should appear in Device Manager
under Ports (COM & LPT), e.g. Silicon Labs CP210x USB to UART Bridge (COM4).
No port β install the CP210x or CH340 driver (depends on the USB chip on your board). - Download and unpack the zip for your board, e.g.
tetris-clock_v2.1.3_release_16mb.zip. - Run
flash_release_16mb.bat(double-click), or from the command prompt pass the
port explicitly:flash_release_16mb.bat COM4.
If it hangs atConnecting..., hold the BOOT button on the board until writing starts.
After === DONE === the clock restarts and waits for a BLE connection from the app.
This is the flash_release_16mb.bat from the 16MB zip (the other zips contain the
same script with their own file names and flash size):
@echo off
rem Tetris Clock v2.1.3 (release_16mb, 16MB flash) - flash an ESP32 over USB with esptool.
rem Usage: flash_release_16mb.bat [COMx] (no port given = auto-detect)
rem Keep this file in the same folder as the .bin files.
cd /d "%~dp0"
set BAUD=921600
set PORTARG=
if not "%~1"=="" set PORTARG=--port %~1
python --version >nul 2>&1 || (
echo Python not found. Install it from https://www.python.org/downloads/
echo and tick "Add python.exe to PATH" in the installer.
goto :fail
)
python -m esptool version >nul 2>&1 || (
echo esptool not found, installing it with pip...
python -m pip install --upgrade esptool || goto :fail
)
rem 0x1000 bootloader, 0x8000 partition table, 0xe000 otadata (boot app0), 0x10000 application.
rem The nvs partition (0x9000, clock settings) is not touched.
python -m esptool --chip esp32 %PORTARG% --baud %BAUD% write-flash --flash-mode dio --flash-size 16MB ^
0x1000 tetris-clock_v2.1.3_release_16mb_bootloader.bin ^
0x8000 tetris-clock_v2.1.3_release_16mb_pt.bin ^
0xe000 tetris-clock_v2.1.3_boot_app0.bin ^
0x10000 tetris-clock_v2.1.3_release_16mb_fw.bin
if errorlevel 1 goto :fail
echo.
echo === DONE: the clock restarts and waits for a BLE connection ===
pause
exit /b 0
:fail
echo.
echo === FLASH FAILED ===
echo - Stuck at "Connecting...": hold the BOOT button on the board until writing starts.
echo - Write errors: lower the speed, edit "set BAUD=460800" (or 115200) in this file.
echo - No COM port: install the USB-UART driver (CP210x or CH340) and pass the port, e.g. flash_release_16mb.bat COM4
pause
exit /b 1Linux / macOS
python3 -m pip install --upgrade esptool
python3 -m esptool --chip esp32 --baud 921600 write-flash --flash-mode dio --flash-size 16MB \
0x1000 tetris-clock_v2.1.3_release_16mb_bootloader.bin \
0x8000 tetris-clock_v2.1.3_release_16mb_pt.bin \
0xe000 tetris-clock_v2.1.3_boot_app0.bin \
0x10000 tetris-clock_v2.1.3_release_16mb_fw.binFor a 4MB board use the release_4mb files and --flash-size 4MB.
Add --port /dev/ttyUSB0 (Linux) or --port /dev/cu.usbserial-XXXX (macOS) if the
port is not detected automatically.
Single-file image
tetris-clock_v2.1.3_<variant>_full.bin is all four images merged into one, written at address 0x0:
python -m esptool --chip esp32 --baud 921600 write-flash 0x0 tetris-clock_v2.1.3_release_16mb_full.binIt also works with browser-based flashers such as https://espressif.github.io/esptool-js/
(offset 0x0). nvs partition, so the clock's
settings are reset β use it for a clean install, not for updates.
Flash map
| Address | File | Content |
|---|---|---|
0x1000 |
*_bootloader.bin |
Second-stage bootloader |
0x8000 |
*_pt.bin |
Partition table |
0x9000 |
β | nvs: clock settings (not written by the .bat) |
0xe000 |
*_boot_app0.bin |
otadata: boot from app0 |
0x10000 |
*_fw.bin |
Application (app0) |
*_fw.bin is the application only β never write it at 0x1000. If the serial log
(115200 baud) shows invalid header: 0xffffffff in a loop, the bootloader is missing:
reflash with the .bat (or the full image).
Notes
- Use the files of one variant together β don't mix 4MB and 16MB images
- A build with verbose serial logging (
debug_4mb) can be built from the sources, see the README