Skip to content

Commit 6a61571

Browse files
authored
prep fix duplicate compile env
1 parent 023a33b commit 6a61571

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

builder/frameworks/arduino.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,24 @@ def shorthen_includes(env, node):
230230
+ shortened_includes,
231231
)
232232

233+
# Check if framework = arduino, espidf is set
234+
def get_frameworks_in_env():
235+
if "framework" not in env:
236+
print("Config Error: No Framework defined")
237+
return []
238+
frameworks = env["framework"]
239+
found_frameworks = []
240+
if "arduino" in frameworks:
241+
found_frameworks.append("arduino")
242+
if "espidf" in frameworks:
243+
found_frameworks.append("espidf")
244+
return found_frameworks
245+
246+
found_frameworks = get_frameworks_in_env()
247+
print("Found Frameworks:", found_frameworks)
248+
if "arduino" in found_frameworks and "espidf" in found_frameworks:
249+
flag_custom_sdkconfig = False
250+
233251
def call_compile_libs():
234252
if mcu == "esp32c2":
235253
ARDUINO_FRMWRK_C2_LIB_DIR = join(platform.get_package_dir("framework-arduinoespressif32-libs"),mcu)

0 commit comments

Comments
 (0)