From 463ec73a8e74972e43dca5effdeabaf654c47446 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Sun, 5 May 2024 18:33:55 +0200 Subject: [PATCH 1/5] add User-specified partition name for calculation of size for not correct autodected used partition --- builder/main.py | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/builder/main.py b/builder/main.py index 7d2ba0d48..3ba172a97 100644 --- a/builder/main.py +++ b/builder/main.py @@ -171,12 +171,31 @@ def _parse_partitions(env): def _update_max_upload_size(env): if not env.get("PARTITIONS_TABLE_CSV"): return - sizes = [ - _parse_size(p["size"]) for p in _parse_partitions(env) + sizes = { + p["subtype"]: _parse_size(p["size"]) for p in _parse_partitions(env) if p["type"] in ("0", "app") - ] - if sizes: - board.update("upload.maximum_size", max(sizes)) + } + + partitions = {p["name"]: p for p in _parse_partitions(env)} + + # User-specified partition name has the highest priority + custom_app_partition_name = board.get("build.app_partition_name", "") + if custom_app_partition_name: + selected_partition = partitions.get(custom_app_partition_name, {}) + if selected_partition: + board.update("upload.maximum_size", _parse_size(selected_partition["size"])) + return + else: + print( + "Warning! Selected partition `%s` is not available in the partition " \ + "table! Default partition will be used!" % custom_app_partition_name + ) + + for p in partitions.values(): + if p["type"] in ("0", "app"): + board.update("upload.maximum_size", _parse_size(p["size"])) + break + def _to_unix_slashes(path): From 6f28987ccb2131cc91bd2ee39f4be56383fe7fde Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Sun, 5 May 2024 18:51:35 +0200 Subject: [PATCH 2/5] default is slot `ota_0` for size calculation --- builder/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/main.py b/builder/main.py index 3ba172a97..bb0b1e1bf 100644 --- a/builder/main.py +++ b/builder/main.py @@ -192,7 +192,7 @@ def _update_max_upload_size(env): ) for p in partitions.values(): - if p["type"] in ("0", "app"): + if p["type"] in ("0", "app") and p["subtype"] in ("ota_0"): board.update("upload.maximum_size", _parse_size(p["size"])) break From a37feb755031c21936a75d2c4724b4877755e62b Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Sun, 5 May 2024 20:32:11 +0200 Subject: [PATCH 3/5] Build 2361 don't include PPP driver with c2,c3,c6 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index a3a952b9d..1edb48a51 100644 --- a/platform.json +++ b/platform.json @@ -33,7 +33,7 @@ "type": "framework", "optional": true, "owner": "tasmota", - "version": "https://github.com/tasmota/arduino-esp32/releases/download/3.0.0.240510/framework-arduinoespressif32.zip" + "version": "https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/2361/framework-arduinoespressif32-all-release_v5.1-6a374da.zip" }, "framework-arduino-solo1": { "type": "framework", From d0374fa32e354397d240bbd4805e162c87039c06 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Mon, 6 May 2024 14:19:35 +0200 Subject: [PATCH 4/5] Build 2362 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 1edb48a51..5f6426aa0 100644 --- a/platform.json +++ b/platform.json @@ -33,7 +33,7 @@ "type": "framework", "optional": true, "owner": "tasmota", - "version": "https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/2361/framework-arduinoespressif32-all-release_v5.1-6a374da.zip" + "version": "https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/2362/framework-arduinoespressif32-all-release_v5.1-6a374da.zip" }, "framework-arduino-solo1": { "type": "framework", From 8bf98983f994d5d98121fd7cbdeb4efc6ceec1d8 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Tue, 7 May 2024 14:40:08 +0200 Subject: [PATCH 5/5] Update platform to 2024.05.11 --- platform.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform.json b/platform.json index 5f6426aa0..bab2a3793 100644 --- a/platform.json +++ b/platform.json @@ -18,7 +18,7 @@ "type": "git", "url": "https://github.com/tasmota/platform-espressif32.git" }, - "version": "2024.05.10", + "version": "2024.05.11", "frameworks": { "arduino": { "script": "builder/frameworks/arduino.py" @@ -33,19 +33,19 @@ "type": "framework", "optional": true, "owner": "tasmota", - "version": "https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/2362/framework-arduinoespressif32-all-release_v5.1-6a374da.zip" + "version": "https://github.com/tasmota/arduino-esp32/releases/download/3.0.0.240511/framework-arduinoespressif32.zip" }, "framework-arduino-solo1": { "type": "framework", "optional": true, "owner": "tasmota", - "version": "https://github.com/tasmota/arduino-esp32/releases/download/3.0.0.240510/framework-arduinoespressif32-solo1.zip" + "version": "https://github.com/tasmota/arduino-esp32/releases/download/3.0.0.240511/framework-arduinoespressif32-solo1.zip" }, "framework-arduino-ITEAD": { "type": "framework", "optional": true, "owner": "tasmota", - "version": "https://github.com/tasmota/arduino-esp32/releases/download/3.0.0.240510/framework-arduinoespressif32-ITEAD.zip" + "version": "https://github.com/tasmota/arduino-esp32/releases/download/3.0.0.240511/framework-arduinoespressif32-ITEAD.zip" }, "framework-espidf": { "type": "framework",