@@ -56,6 +56,29 @@ def configure_default_packages(self, variables, targets):
56
56
board_sdkconfig = variables .get ("board_espidf.custom_sdkconfig" , board_config .get ("espidf.custom_sdkconfig" , "" ))
57
57
frameworks = variables .get ("pioframework" , [])
58
58
59
+ def _lazy_framework_validation (self , variables ):
60
+ """Perform framework validation only when actually needed"""
61
+ if not hasattr (self , '_framework_validated' ):
62
+ frameworks = variables .get ("pioframework" , [])
63
+
64
+ # Only validate if we have sufficient context
65
+ if (variables .get ("board" ) and
66
+ variables .get ("project_dir" ) and
67
+ not frameworks ):
68
+
69
+ self ._show_framework_warning ()
70
+
71
+ self ._framework_validated = True
72
+
73
+ def _show_framework_warning (self ):
74
+ """Show framework warning without terminating early setup"""
75
+ warning_msg = (
76
+ "\n ⚠️ WARNING: No framework specified in platformio.ini\n "
77
+ " Add 'framework = arduino' or 'framework = espidf'\n "
78
+ " Build may fail without proper framework configuration.\n "
79
+ )
80
+ print (warning_msg , file = sys .stderr )
81
+
59
82
def install_tool (TOOL , retry_count = 0 ):
60
83
self .packages [TOOL ]["optional" ] = False
61
84
TOOL_PATH = os .path .join (ProjectConfig .get_instance ().get ("platformio" , "packages_dir" ), TOOL )
0 commit comments