@@ -91,7 +91,7 @@ def setup_logging():
91
91
92
92
def get_platform_default_threshold (mcu ):
93
93
"""
94
- Platform-specific bleeding edge default values for
94
+ Platform-specific max performance default values for
95
95
INCLUDE_PATH_LENGTH_THRESHOLD
96
96
These values push the limits for maximum performance and minimal path
97
97
shortening
@@ -100,36 +100,36 @@ def get_platform_default_threshold(mcu):
100
100
mcu: MCU type (esp32, esp32s2, esp32s3, etc.)
101
101
102
102
Returns:
103
- int: Platform-specific bleeding edge default threshold
103
+ int: Platform-specific default threshold
104
104
"""
105
- # Bleeding edge values - pushing Windows command line limits
105
+ # Max. performance values - pushing Windows command line limits
106
106
# Windows CMD has ~32768 character limit, we use aggressive values close
107
107
# to this
108
108
platform_defaults = {
109
- "esp32" : 45000 , # Standard ESP32
110
- "esp32s2" : 43000 , # ESP32-S2
111
- "esp32s3" : 48000 , # ESP32-S3
112
- "esp32c3" : 41000 , # ESP32-C3
113
- "esp32c2" : 38000 , # ESP32-C2
114
- "esp32c6" : 44000 , # ESP32-C6
115
- "esp32h2" : 40000 , # ESP32-H2
116
- "esp32p4" : 50000 , # ESP32-P4
109
+ "esp32" : 32000 , # Standard ESP32
110
+ "esp32s2" : 32000 , # ESP32-S2
111
+ "esp32s3" : 33200 , # ESP32-S3
112
+ "esp32c3" : 32000 , # ESP32-C3
113
+ "esp32c2" : 32000 , # ESP32-C2
114
+ "esp32c6" : 31600 , # ESP32-C6
115
+ "esp32h2" : 32000 , # ESP32-H2
116
+ "esp32p4" : 32000 , # ESP32-P4
117
117
}
118
118
119
- default_value = platform_defaults .get (mcu , 45000 ) # Aggressive fallback
119
+ default_value = platform_defaults .get (mcu , 31600 )
120
120
121
121
# Debug output only in verbose mode
122
122
if logging .getLogger ().isEnabledFor (logging .DEBUG ):
123
123
logging .debug (
124
- f"Bleeding edge platform default threshold for { mcu } : "
124
+ f"Max. possible platform default threshold for { mcu } : "
125
125
f"{ default_value } " )
126
126
127
127
return default_value
128
128
129
129
130
130
def validate_threshold (threshold , mcu ):
131
131
"""
132
- Validates threshold value with bleeding edge limits
132
+ Validates threshold value with max. performance limits
133
133
Uses aggressive boundaries for maximum performance
134
134
135
135
Args:
@@ -139,24 +139,24 @@ def validate_threshold(threshold, mcu):
139
139
Returns:
140
140
int: Validated threshold value
141
141
"""
142
- # Bleeding edge absolute limits - pushing boundaries
143
- min_threshold = 15000 # Minimum reasonable value for complex projects
142
+ # Absolute limits - pushing boundaries
143
+ min_threshold = 20000 # Minimum reasonable value for complex projects
144
144
# Maximum aggressive value (beyond Windows CMD limit for testing)
145
- max_threshold = 65000
145
+ max_threshold = 32767
146
146
147
- # MCU-specific bleeding edge adjustments - all values are aggressive
147
+ # MCU-specific adjustments - all values are aggressive
148
148
mcu_adjustments = {
149
- "esp32c2" : {"min" : 30000 , "max" : 40000 },
150
- "esp32c3" : {"min" : 30000 , "max" : 45000 },
151
- "esp32" : {"min" : 30000 , "max" : 50000 },
152
- "esp32s2" : {"min" : 30000 , "max" : 50000 },
153
- "esp32s3" : {"min" : 30000 , "max" : 50000 },
154
- "esp32p4" : {"min" : 30000 , "max" : 55000 },
155
- "esp32c6" : {"min" : 30000 , "max" : 50000 },
156
- "esp32h2" : {"min" : 30000 , "max" : 40000 },
149
+ "esp32c2" : {"min" : 30000 , "max" : 32767 },
150
+ "esp32c3" : {"min" : 30000 , "max" : 32767 },
151
+ "esp32" : {"min" : 30000 , "max" : 32767 },
152
+ "esp32s2" : {"min" : 30000 , "max" : 32767 },
153
+ "esp32s3" : {"min" : 30000 , "max" : 32767 },
154
+ "esp32p4" : {"min" : 30000 , "max" : 32767 },
155
+ "esp32c6" : {"min" : 30000 , "max" : 32767 },
156
+ "esp32h2" : {"min" : 30000 , "max" : 32767 },
157
157
}
158
158
159
- # Apply MCU-specific bleeding edge limits
159
+ # Apply MCU-specific max. limits
160
160
if mcu in mcu_adjustments :
161
161
min_threshold = max (min_threshold , mcu_adjustments [mcu ]["min" ])
162
162
max_threshold = min (max_threshold , mcu_adjustments [mcu ]["max" ])
@@ -165,48 +165,48 @@ def validate_threshold(threshold, mcu):
165
165
166
166
if threshold < min_threshold :
167
167
print (f"*** Warning: Include path threshold { threshold } too "
168
- f"conservative for { mcu } , using bleeding edge minimum "
168
+ f"conservative for { mcu } , using safe minimum "
169
169
f"{ min_threshold } ***" )
170
170
threshold = min_threshold
171
171
elif threshold > max_threshold :
172
172
print (f"*** Warning: Include path threshold { threshold } exceeds "
173
- f"bleeding edge maximum for { mcu } , using { max_threshold } ***" )
173
+ f"possible maximum for { mcu } , using { max_threshold } ***" )
174
174
threshold = max_threshold
175
175
176
176
# Warning for conservative values (opposite of original - warn if too low)
177
177
platform_default = get_platform_default_threshold (mcu )
178
- if threshold < platform_default * 0.7 : # More than 30% below bleeding edge default
178
+ if threshold < platform_default * 0.7 : # More than 30% below max. default
179
179
print (f"*** Info: Include path threshold { threshold } is conservative "
180
- f"compared to bleeding edge default { platform_default } for "
180
+ f"compared to maximum default { platform_default } for "
181
181
f"{ mcu } ***" )
182
182
print ("*** Consider using higher values for maximum performance ***" )
183
183
184
184
if original_threshold != threshold :
185
185
logging .warning (f"Threshold adjusted from { original_threshold } to "
186
- f"bleeding edge value { threshold } for { mcu } " )
186
+ f"max. possible value { threshold } for { mcu } " )
187
187
188
188
return threshold
189
189
190
190
191
191
def get_include_path_threshold (env , config , current_env_section ):
192
192
"""
193
193
Determines Windows INCLUDE_PATH_LENGTH_THRESHOLD from various sources
194
- with priority order and bleeding edge validation
194
+ with priority order and max. possible validation
195
195
196
196
Priority order:
197
197
1. Environment variable PLATFORMIO_INCLUDE_PATH_THRESHOLD
198
198
2. Environment-specific setting in platformio.ini
199
199
3. Global setting in [env] section
200
200
4. Setting in [platformio] section
201
- 5. MCU-specific bleeding edge default value
201
+ 5. MCU-specific max. possible default value
202
202
203
203
Args:
204
204
env: PlatformIO Environment
205
205
config: Project Configuration
206
206
current_env_section: Current environment section
207
207
208
208
Returns:
209
- int: Validated bleeding edge threshold value
209
+ int: Validated max. threshold value
210
210
"""
211
211
mcu = env .BoardConfig ().get ("build.mcu" , "esp32" )
212
212
default_threshold = get_platform_default_threshold (mcu )
@@ -219,7 +219,7 @@ def get_include_path_threshold(env, config, current_env_section):
219
219
try :
220
220
threshold = int (env_var )
221
221
threshold = validate_threshold (threshold , mcu )
222
- print (f"*** Using environment variable bleeding edge include "
222
+ print (f"*** Using environment variable max. possible include "
223
223
f"path threshold: { threshold } (MCU: { mcu } ) ***" )
224
224
return threshold
225
225
except ValueError :
@@ -231,44 +231,44 @@ def get_include_path_threshold(env, config, current_env_section):
231
231
if config .has_option (current_env_section , setting_name ):
232
232
threshold = config .getint (current_env_section , setting_name )
233
233
threshold = validate_threshold (threshold , mcu )
234
- print (f"*** Using environment-specific bleeding edge include "
234
+ print (f"*** Using environment-specific max. possible include "
235
235
f"path threshold: { threshold } (MCU: { mcu } ) ***" )
236
236
return threshold
237
237
238
238
# 3. Check global setting in [env] section
239
239
if config .has_option ("env" , setting_name ):
240
240
threshold = config .getint ("env" , setting_name )
241
241
threshold = validate_threshold (threshold , mcu )
242
- print (f"*** Using global [env] bleeding edge include path "
242
+ print (f"*** Using global [env] max. possible include path "
243
243
f"threshold: { threshold } (MCU: { mcu } ) ***" )
244
244
return threshold
245
245
246
246
# 4. Check setting in [platformio] section
247
247
if config .has_option ("platformio" , setting_name ):
248
248
threshold = config .getint ("platformio" , setting_name )
249
249
threshold = validate_threshold (threshold , mcu )
250
- print (f"*** Using [platformio] section bleeding edge include "
250
+ print (f"*** Using [platformio] section max. possible include "
251
251
f"path threshold: { threshold } (MCU: { mcu } ) ***" )
252
252
return threshold
253
253
254
- # 5. Use MCU-specific bleeding edge default value
254
+ # 5. Use MCU-specific max. possible default value
255
255
threshold = validate_threshold (default_threshold , mcu )
256
256
if env .get ("VERBOSE" ):
257
- print (f"*** Using platform-specific bleeding edge default "
257
+ print (f"*** Using platform-specific max. possible default "
258
258
f"include path threshold: { threshold } (MCU: { mcu } ) ***" )
259
259
260
260
return threshold
261
261
262
262
except (ValueError , TypeError ) as e :
263
263
print (f"*** Warning: Invalid include path threshold value, using "
264
- f"bleeding edge platform default { default_threshold } for "
264
+ f"max. possible platform default { default_threshold } for "
265
265
f"{ mcu } : { e } ***" )
266
266
return validate_threshold (default_threshold , mcu )
267
267
268
268
269
269
def get_threshold_info (env , config , current_env_section ):
270
270
"""
271
- Helper function for debug information about bleeding edge threshold
271
+ Helper function for debug information about max. possible threshold
272
272
configuration
273
273
274
274
Args:
0 commit comments