Skip to content

Commit

Permalink
Merge pull request #103 from Jason2866/Arduino/IDF5
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
Jason2866 authored Dec 8, 2023
2 parents 98c0f00 + ce3f0ba commit 5426a6e
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ 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")
Expand Down Expand Up @@ -75,15 +76,6 @@ def configure_default_packages(self, variables, targets):
elif p in ("tool-mconf", "tool-idf") and IS_WINDOWS:
self.packages[p]["optional"] = False

# Use the latest toolchains available for IDF v5.1
for target in (
"xtensa-esp32",
"xtensa-esp32s2",
"xtensa-esp32s3",
"riscv32-esp"
):
self.packages["toolchain-%s" % target]["version"] = "12.2.0+20230208"

for available_mcu in ("esp32", "esp32s2", "esp32s3"):
if available_mcu == mcu:
self.packages["toolchain-xtensa-%s" % mcu]["optional"] = False
Expand Down Expand Up @@ -133,7 +125,7 @@ def _add_dynamic_options(self, board):
"tumpa",
]

if board.get("build.mcu", "") in ("esp32c2", "esp32c3", "esp32c6", "esp32s3", "esp32h2"):
if board.get("build.mcu", "") in ("esp32c3", "esp32c6", "esp32s3", "esp32h2"):
supported_debug_tools.append("esp-builtin")

upload_protocol = board.manifest.get("upload", {}).get("protocol")
Expand Down

0 comments on commit 5426a6e

Please sign in to comment.