Skip to content

Commit

Permalink
Install Arduino framework only for Arduino or mixed Projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Dec 8, 2023
1 parent 3f5fb05 commit c8d0f76
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 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

0 comments on commit c8d0f76

Please sign in to comment.