Commit Graph
197 Commits
Author SHA1 Message Date
joluxerandGitHub a2c38a9b76 build: copy firmware artifacts with ELF-extracted build timestamp (opt-in) (#24794)
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.
2026-06-13 12:23:56 +02:00
Jason2866andGitHub 166bb946bd fix pioarduino build (#24789) 2026-05-25 17:09:36 +02:00
Christian BaarsandGitHub ef35d7b6c6 Cleaner solidify (#24788) 2026-05-25 17:04:03 +02:00
Christian BaarsandGitHub 2666434b90 BearSSL: update SHA functions for breaking change of IDF 5.5 (#24757) 2026-05-17 13:21:37 +02:00
s-hadingerandGitHub 1ef3723300 Manual tool to compare and verify Berry solidification between C and Python (#24754) 2026-05-16 21:09:02 +02:00
Allen SchoberandGitHub 90ed4a1b94 Fix URL detection and path handling in esp32_build_filesystem (#24748)
- Replace broken "http" and "://" in file condition with file.startswith(("http://", "https://")) — the original always evaluated "http" as truthy and only tested for "://".
- Strip whitespace and skip blank lines from custom_files_upload entries, matching the pattern in solidify-from-url.py.
- Resolve relative local paths against $PROJECT_DIR rather than the build-time CWD.
2026-05-16 14:25:28 +02:00
Allen SchoberandGitHub 68d21ac2d7 Create tasmota_defines_for_berry.be stub before solidification if absent (#24749)
- solidify_all_python.be imports tasmota_defines during solidification, but the actual file is generated post-compilation by gen-berry-defines.py. If it doesn't exist yet, solidification fails. Create an empty stub before calling prepareBerryFiles so the import succeeds regardless of build order.
2026-05-16 12:28:22 +02:00
Jason2866andGitHub 6e3ee37842 Remove -DUSE_SHA_ROM flag for esp32s3 due to issues (#24744) 2026-05-15 22:17:50 +02:00
Allen SchoberandGitHub 2333988b91 Add local file support to solidify-from-url (#24732)
* Add local file support to solidify-from-url.py and fix URL rename alias bug

- Add support for local .be file paths (absolute or PROJECT_DIR-relative) in prepareBerryFiles used by custom_berry_solidify project option in solidify-from-url.py
- Fix URL path to use "/" as separator instead of os.path.sep, and pass the rename alias to addHeaderFile so the solidified header name matches the actual target filename

* solidify-from-url: replace compiled berry binary with berry_port Python interpreter

- Remove ensureBerry() and the shell invocation of the compiled `berry` binary.
- Instead run solidify_all_python.be via `python3 -m berry_port`, matching how gen-berry-structures.py drives solidification for all other berry modules.
- Use Popen to filter routine per-file output and call env.Exit on failure.
2026-05-13 10:43:46 +02:00
Jason2866andGitHub ad671a557c esp8266: Wrap printf and replace with stubs. Saves around 6 kb flash (#24714)
* wrap printf with stubs

* Remove flash savings message from wrap_printf

Removed print statement indicating flash savings for ESP8266.

* safe more by using rom function
2026-05-11 13:21:20 +02:00
Jason2866andGitHub 1eb21cbb35 Fix non-build target checks in tasmotapiolib.py
"upload" was wrong in list. Runs compile > Berry scripts needed
2026-05-09 13:15:23 +02:00
Jason2866andGitHub f5cafb7a0e redirect the floating-point capable vfprintf / vfscanf symbols to picolibc's integer-only variant (#24720) 2026-05-09 10:45:29 +02:00
Jason2866andGitHub 2d807e9b4c Disable berry pio scripts for targets where not needed (#24723) 2026-05-07 22:54:58 +02:00
Jason2866andGitHub d6146824cf Disable Berry scripts when running Arduino IDF libs build with HybridCompile (#24719) 2026-05-07 13:08:03 +02:00
s-hadingerandGitHub 485920a4fc Berry solidification cache (#24710) 2026-05-05 22:43:53 +02:00
Jason2866andGitHub 358c15f7a8 use build env folder for dummy sdkconfig.h (#24684) 2026-04-26 13:48:42 +02:00
s-hadingerandGitHub f6bcc0e16a Berry transpose C defines to Berry in tasmota_defines_for_berry.be (#24680) 2026-04-25 23:28:49 +02:00
s-hadingerandGitHub 802b7c7aee Berry solidification is now part of the build system (#24664)
* Berry solidification if now part of the build system

* Force Python in UTF-8 on Windows
2026-04-21 16:08:28 +02:00
Jason2866andGitHub ccc8eb0ef8 Do not use script port-vsc.py for pioarduino >= 1.3.6 (#24642) 2026-04-17 11:49:02 +02:00
Jason2866andGitHub 6db42be41f fix zopfli import error (#24631) 2026-04-11 23:55:01 +02:00
Jason2866andGitHub ee93c18e2e Prepare switch to IDF 5.5.3 based Tasmota Arduino (#24597)
* C2 Hybrid Compile safeboot
* Refactor firmware size check to use size tool output and regex.
2026-03-27 17:35:54 +01:00
Jason2866andGitHub be7ab64492 Remove debug leftovers (#24595)
* Comment out check-wrapped-lwip-sntp-calls.py script

Comment out the check-wrapped-lwip-sntp-calls.py script in platformio.ini.

* Delete pio-tools/check-wrapped-lwip-sntp-calls.py
2026-03-26 14:21:10 +01:00
the-way-of-A-WildandGitHub 86bc033c86 Neutralize lwIP SNTP client to prevent heap drain on WiFi reconnects (#24593)
The ESP8266 SDK automatically invokes sntp_init() via
netif_sta_status_callback on every WiFi reconnect. This results in repeated
allocations of UDP PCBs (udp_new()), leading to heap exhaustion and
potential lwIP timeout list corruption due to unmatched sntp_stop() calls.

Tasmota does not use the lwIP SNTP client and relies solely on WifiGetNtp()
for time synchronization. To avoid unnecessary resource usage, wrap and
neutralize sntp_init() and sntp_stop() with no-op implementations.

This prevents UDP PCB allocations and avoids issues caused by repeated
initialization during reconnect cycles.

Additionally, a PlatformIO post-build script has been added to validate
that the linker wraps are correctly applied. The script runs after ELF
generation and uses xtensa-lx106-elf-nm to inspect symbols, ensuring that
the __wrap_sntp_init and __wrap_sntp_stop functions are present in the
final firmware. If the wrappers are missing, the build fails.

Confirmed via firmware disassembly:
- Single call site in netif_sta_status_callback
- Requires linker wraps: --wrap=sntp_init,--wrap=sntp_stop

Fixes: #24566
2026-03-26 10:42:02 +01:00
Theo Arends 0e9246e428 Replace CRLF in LF 2026-02-13 11:24:01 +01:00
Jason2866andGitHub bf82f4183b remove redundant FS pio script (#24355) 2026-01-17 16:15:22 +01:00
Jason2866andGitHub 54a152f440 Platform 2025.12.31 2025-12-24 15:06:28 +01:00
s-hadingerandGitHub 92a97a65f9 Berry remove animate (#24241)
* Remove tab from json

* Berry 'animate' to be replaced with 'animation' framework
2025-12-21 12:44:20 +01:00
Jason2866andGitHub 2ab3c0078d refactor objdump pio script 2025-08-21 21:24:26 +02:00
Jason2866andGitHub 3eb6bf6c8e Add initial c5 support (#23804) 2025-08-20 21:51:23 +02:00
Jason2866andGitHub e18507f2db esp8266 Platform 2025.08.00 (#23801) 2025-08-17 19:21:49 +02:00
s-hadingerandGitHub ca934bae33 Preview of Berry animation framework (#23740)
* Preview of Berry animation framework

* fix comet and compilation for safeboot
2025-08-01 18:02:02 +02:00
Jason2866andGitHub 64d5045ccb Simplify Pio script post_esp32.py (#23689)
* simplify post_esp32.py
* make sure path has correct "\" or "/" regarding OS
* add os specific path separators
* more path possible issues corrections
* add function to normpath cmd
* set board_build.variants_dir    = variants/tasmota correctly for OS
2025-07-16 18:23:33 +02:00
Jason2866andGitHub 3c0e71c290 Platform 2025.07.31 Tasmota Arduino Core 3.1.3.250712 based on IDF 5.3.3.250702 (#23685)
* use OBJCOPY for full esptool path
* Update PULL_REQUEST_TEMPLATE.md
* Platform 2025.07.31 Tasmota Arduino Core 3.1.3.250712 based on IDF 5.3.3.250702
2025-07-16 09:55:34 +02:00
Jason2866andGitHub a38146cc95 Revert "Platform 2025.07.31 Tasmota Arduino Core 3.1.3.250712 based on IDF 5.…" (#23684)
This reverts commit 228588a6a3.
2025-07-15 18:42:30 +02:00
Jason2866andGitHub 228588a6a3 Platform 2025.07.31 Tasmota Arduino Core 3.1.3.250712 based on IDF 5.3.3.250702 (#23683)
* Platform 2025.07.31 Tasmota Arduino Core 3.1.3.250712 based on IDF 5.3.3.250702
2025-07-15 18:40:08 +02:00
Jason2866andGitHub cddcafbda3 Switch off not needed waiting for FS up and download (#23677) 2025-07-13 21:24:25 +02:00
Jason2866andGitHub bb53b42790 fix esptool call 2025-07-09 22:35:38 +02:00
Jason2866andGitHub dc14f1c3bd esptool v5.0.0 changes for post pio esp32 script (#23650) 2025-07-08 22:05:14 +02:00
Jason2866andGitHub 25c85a90ac esptool v5 explicit exists (#23576)
fetch the exit to prevent leaving the running script
2025-06-19 20:19:37 +02:00
Jason2866andGitHub c8d6f723c1 Beautify console log output (#23456) 2025-05-21 22:15:23 +02:00
Jason2866andGitHub 17210d1aca port VSC: take care of WSL use (#23440) 2025-05-18 16:30:43 +02:00
Jason2866andGitHub 54a9a117fc make new VSC port pio script more failsafe (#23439)
* no crash when VSC database is not found
* don't stop when unknown OS is detected
2025-05-18 15:41:10 +02:00
Jason2866andGitHub a088c8791f provide serial upoload port from VSC to PIO (#23436) 2025-05-17 19:59:14 +02:00
Jason2866andGitHub 2ab84dd3a4 piotool python scripts refactor (#23375) 2025-05-05 13:12:30 +02:00
Jason2866andGitHub 234c5ea170 check fw size against partition (#23160) 2025-03-17 13:59:25 +01:00
Jason2866andGitHub 214b392839 add esp32-c6 to objdump pio script 2025-02-11 11:58:32 +01:00
Ryan CastellucciandGitHub dc531de02b auto compress updated html (#22738) 2024-12-29 22:27:10 +01:00
Ryan CastellucciandGitHub a1aef6b39f improved zopfli compression (#22737) 2024-12-29 20:47:12 +01:00
Christian BaarsandGitHub 6268066bac make regex more flexible for different quotation marks (#22629) 2024-12-12 11:21:47 +01:00
Jason2866andGitHub b9414008df Hybrid compile: take custom boards settings in account (#22542) 2024-11-23 17:23:10 +01:00