Skip to content

Commit

Permalink
Update platform to 2024.05.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored May 7, 2024
2 parents b1c26e2 + 8bf9898 commit aef517d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
29 changes: 24 additions & 5 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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") and p["subtype"] in ("ota_0"):
board.update("upload.maximum_size", _parse_size(p["size"]))
break



def _to_unix_slashes(path):
Expand Down
8 changes: 4 additions & 4 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -33,19 +33,19 @@
"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/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",
Expand Down

0 comments on commit aef517d

Please sign in to comment.