Skip to content

Commit

Permalink
Merge pull request platformio#105 from Jason2866/Tasmota/20x
Browse files Browse the repository at this point in the history
fix for extracting LittleFS image content
  • Loading branch information
Jason2866 authored Dec 22, 2023
2 parents 42bf8ed + be8f3fb commit 6ec9b79
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
3 changes: 2 additions & 1 deletion boards/lolin_s2_mini.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"extra_flags": [
"-DARDUINO_LOLIN_S2_MINI",
"-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_CDC_ON_BOOT=1"
"-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=0"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
Expand Down
10 changes: 5 additions & 5 deletions boards/lolin_s3.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
},
"core": "esp32",
"extra_flags": [
"-DBOARD_HAS_PSRAM",
"-DARDUINO_LOLIN_S3",
"-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_MODE=1",
"-DARDUINO_USB_CDC_ON_BOOT=1"
"-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
Expand Down Expand Up @@ -39,9 +41,7 @@
"upload": {
"flash_size": "16MB",
"maximum_ram_size": 327680,
"maximum_size": 16777216,
"use_1200bps_touch": true,
"wait_for_upload_port": true,
"maximum_size": 16777216,
"require_upload_port": true,
"speed": 460800
},
Expand Down
3 changes: 2 additions & 1 deletion platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"tool-esptoolpy": {
"type": "uploader",
"owner": "tasmota",
"version": "https://github.com/tasmota/esptool/releases/download/v4.7.0-dev2/esptool-4.7.0.zip"
"version": "https://github.com/tasmota/esptool/releases/download/v4.7.0/esptool-4.7.0.zip"
},
"tool-dfuutil-arduino": {
"type": "uploader",
Expand All @@ -102,6 +102,7 @@
},
"tool-mkspiffs": {
"type": "uploader",
"optional": true,
"owner": "platformio",
"version": "~2.230.0"
},
Expand Down
21 changes: 14 additions & 7 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,16 @@ def configure_default_packages(self, variables, targets):
core_variant_build = (''.join(variables.get("build_flags", []))).replace("-D", " ")
frameworks = variables.get("pioframework", [])

if "CORE32SOLO1" in core_variant_board or "FRAMEWORK_ARDUINO_SOLO1" in core_variant_build:
self.packages["framework-arduino-solo1"]["optional"] = False
elif "CORE32ITEAD" in core_variant_board or "FRAMEWORK_ARDUINO_ITEAD" in core_variant_build:
self.packages["framework-arduino-ITEAD"]["optional"] = False
else:
self.packages["framework-arduinoespressif32"]["optional"] = False
if "arduino" in frameworks:
if "CORE32SOLO1" in core_variant_board or "FRAMEWORK_ARDUINO_SOLO1" in core_variant_build:
self.packages["framework-arduino-solo1"]["optional"] = False
elif "CORE32ITEAD" in core_variant_board or "FRAMEWORK_ARDUINO_ITEAD" in core_variant_build:
self.packages["framework-arduino-ITEAD"]["optional"] = False
else:
self.packages["framework-arduinoespressif32"]["optional"] = False

if "buildfs" in targets:
filesystem = variables.get("board_build.filesystem", "spiffs")
filesystem = variables.get("board_build.filesystem", "littlefs")
if filesystem == "littlefs":
self.packages["tool-mklittlefs"]["optional"] = False
elif filesystem == "fatfs":
Expand All @@ -63,6 +64,12 @@ def configure_default_packages(self, variables, targets):
else:
del self.packages["tool-dfuutil-arduino"]

if "downloadfs" in targets:
filesystem = variables.get("board_build.filesystem", "littlefs")
if filesystem == "littlefs":
# Use Tasmota mklittlefs v4.0.0 to unpack, older version is incompatible
self.packages["tool-mklittlefs"]["version"] = "~4.0.0"

if "espidf" in frameworks:
# Common packages for IDF and mixed Arduino+IDF projects
self.packages["toolchain-esp32ulp"]["optional"] = False
Expand Down

0 comments on commit 6ec9b79

Please sign in to comment.