mirror of
https://github.com/arendst/Tasmota.git
synced 2026-07-27 20:05:46 +00:00
New post-build script pio-tools/timestamp-firmware.py copies firmware artifacts to timestamped filenames when append_timestamp = 1 is set in the [tasmota] section of platformio_override.ini. Default off; standard builds unaffected. The timestamp is extracted from the ELF symbol table via nm: named PROGMEM symbols mdate_P and mtime_P in GetBuildDateAndTime() carry __DATE__ and __TIME__ respectively. Reading them from the ELF guarantees the filename timestamp matches exactly the one the firmware reports at boot. No -g flag required. Artifacts written with timestamp suffix (e.g. tasmota-4M-2026-05-01T19-02-06): .bin, .bin.gz, .factory.bin (ESP32) -> build_output/firmware/ .elf -> build_output/firmware/ .map.gz -> build_output/map/ support_rtc.ino: mtime_P introduced as a named PROGMEM variable so nm can locate __TIME__ by symbol name on all platforms, including ESP32 where PSTR() is a no-op. Flash impact: +4 B; all other memory unchanged.