@@ -230,22 +230,22 @@ def shorthen_includes(env, node):
230
230
+ shortened_includes ,
231
231
)
232
232
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 :
233
+ # Check if framework = arduino, espidf is set "Arduino as an component of IDF"
234
+ def get_frameworks_in_current_env ():
235
+ current_env_section = "env:" + env [ "PIOENV" ]
236
+ # Check if the "framework" option exists in the current environment
237
+ if "framework" in projectconfig . options ( current_env_section ):
238
+ # Get the value of the ' framework' option
239
+ frameworks = projectconfig . get ( current_env_section , "framework" , "" )
240
+ # Split comma-separated frameworks and return them as a list
241
+ return frameworks . split ( ", " )
242
+ # If no frameworks are found, return an empty list
243
+ return []
244
+
245
+ current_env_frameworks = get_frameworks_in_current_env ()
246
+ print ( "Frameworks in the current environment:" , current_env_frameworks )
247
+ if "arduino" in current_env_frameworks and "espidf" in current_env_frameworks :
248
+ # Arduino as component is set as config, switch off Hybrid compile
249
249
flag_custom_sdkconfig = False
250
250
251
251
def call_compile_libs ():
0 commit comments