diff --git a/pio-tools/gzip-firmware.py b/pio-tools/gzip-firmware.py index e03418262..19c323300 100644 --- a/pio-tools/gzip-firmware.py +++ b/pio-tools/gzip-firmware.py @@ -20,6 +20,10 @@ def map_gzip(source, target, env): with map_file.open("rb") as fp: with gzip.open(gzip_file, "wb", compresslevel=9) as f: shutil.copyfileobj(fp, f) + if env["PIOPLATFORM"] == "espressif32": + # Print Metrics for firmware using "map" file + import tasmota_metrics + env.Execute("$PYTHONEXE -m tasmota_metrics " + str(map_file.resolve())) # remove map file if map_file.is_file(): diff --git a/pio-tools/name-firmware.py b/pio-tools/name-firmware.py index 524f712e6..47366990d 100644 --- a/pio-tools/name-firmware.py +++ b/pio-tools/name-firmware.py @@ -28,11 +28,4 @@ def bin_map_copy(source, target, env): shutil.move(tasmotapiolib.get_source_map_path(env), map_file) if env["PIOPLATFORM"] == "espressif32": shutil.copy(factory, one_bin_file) - # Print Metrics for firmware using "map" file - import esp_idf_size - CYAN = '\033[96m' - ENDC = '\033[0m' - print(CYAN + "=============================================================================================" + ENDC) - env.Execute("$PYTHONEXE -m esp_idf_size " + str(map_file.resolve())) - print(CYAN + "=============================================================================================" + ENDC) env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", bin_map_copy) diff --git a/platformio_tasmota32.ini b/platformio_tasmota32.ini index eb4e6b051..cec17d738 100644 --- a/platformio_tasmota32.ini +++ b/platformio_tasmota32.ini @@ -42,7 +42,7 @@ extra_scripts = pre:pio-tools/add_c_flags.py ${esp_defaults.extra_scripts} [core32] -platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.04.00/platform-espressif32.zip +platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.04.01/platform-espressif32.zip platform_packages = build_unflags = ${esp32_defaults.build_unflags} build_flags = ${esp32_defaults.build_flags}