Build & Code Your Own Smartwatch
For new Clockstar (v2) refer to here
To build the Clockstar base firmware, you'll need the ESP-IDF. You can find the getting started guide here. The production firmware is built using IDF version 5.1, commit 3a45d4e.
Contained in the repository is ESP-IDF.patch. The patch addresses issues in IDF v5.1 related to FPU registers during context switching.
For proper code functioning, apply this patch onto your ESP-IDF installation path using:
cd /esp-idf-path/
git apply ESP-IDF.patch
Clone all submodules from the project root
git submodule update --init --recursive
Contained in the repository is LovyanGFX.patch. Apply it onto the cloned LovyanGFX submodule:
cd components/LovyanGFX
git apply ../../LovyanGFX.patch
After patching everything, in the root directory of the project:
To build the firmware run idf.py build
To upload the firmware to the device run idf.py -p <PORT> flash
. Replace <PORT>
with
the port Clockstar is attached to, for ex. COM6
or /dev/ttyACM0
.
After building (or flashing) the firmware, you can merge the resulting files into a single binary file. This is useful for sharing a build or flashing it directly onto the board.
The necessary tool for this is esptool, which comes preinstalled with ESP-IDF
From the project root go into your build folder (usually just /build):
cd build
esptool --chip esp32 merge_bin --fill-flash-size 4MB -o ../Clockstar.bin --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0 bootloader/bootloader.bin 0x10000 Clockstar-v2-Firmware.bin 0x8000 partition_table/partition-table.bin 0x2f6000 storage.bin
To restore the stock firmware, you can download the prebuilt binary on the releases page of this repository and flash it manually using esptool:
esptool -c esp32 -b 921600 -p <PORT> write_flash 0 Clockstar-Firmware.bin
Alternatively, you can also do so using CircuitBlocks by logging in, clicking the "Restore Firmware" button in the top-right corner, and following the on-screen instructions.
Copyright © 2025 CircuitMess
Licensed under MIT License.