37
37
from platformio .project .config import ProjectConfig
38
38
from platformio .package .manager .tool import ToolPackageManager
39
39
40
- # Globale Variablen für bessere Performance
40
+ # Global variables for better performance
41
41
env = DefaultEnvironment ()
42
42
pm = ToolPackageManager ()
43
43
platform = env .PioPlatform ()
48
48
IS_WINDOWS = sys .platform .startswith ("win" )
49
49
IS_INTEGRATION_DUMP = env .IsIntegrationDump ()
50
50
51
- # Cache für häufig verwendete Werte
51
+ # Cache for frequently used values
52
52
FRAMEWORK_LIB_DIR = platform .get_package_dir ("framework-arduinoespressif32-libs" )
53
53
FRAMEWORK_SDK_DIR = fs .to_unix_path (join (FRAMEWORK_LIB_DIR , mcu , "include" ))
54
54
55
- # Optimierte Konfigurationserkennung
55
+ # Optimized configuration detection
56
56
entry_custom_sdkconfig = "\n "
57
57
flag_custom_sdkconfig = False
58
58
pioenv = env ["PIOENV" ]
73
73
74
74
SConscript ("_embed_files.py" , exports = "env" )
75
75
76
- # Optimierte ESP32-Solo1 Konfiguration
76
+ # Optimized ESP32-Solo1 configuration
77
77
if (flag_custom_sdkconfig and
78
78
("CORE32SOLO1" in extra_flags or
79
79
"CONFIG_FREERTOS_UNICORE=y" in entry_custom_sdkconfig or
86
86
build_unflags += " -mdisable-hardware-atomics -ustart_app_other_cores"
87
87
env .Replace (BUILD_UNFLAGS = build_unflags .split ())
88
88
89
- # Cache für installierte Pakete
89
+ # Cache for installed packages
90
90
_installed_packages_cache = None
91
91
92
92
def install_python_deps ():
@@ -140,11 +140,11 @@ def _get_installed_pip_packages():
140
140
141
141
install_python_deps ()
142
142
143
- # Optimierte MD5-Hash-Funktion
143
+ # Optimized MD5 hash function
144
144
def get_MD5_hash (phrase ):
145
145
return hashlib .md5 (phrase .encode ('utf-8' )).hexdigest ()[:16 ]
146
146
147
- # Cache für sdkconfig-Matching
147
+ # Cache for sdkconfig matching
148
148
_sdkconfig_cache = {}
149
149
150
150
def matching_custom_sdkconfig ():
@@ -202,7 +202,7 @@ def check_reinstall_frwrk():
202
202
203
203
return False
204
204
205
- # Optimierte Include-Pfad-Verkürzung
205
+ # Optimized include path shortening
206
206
def shorthen_includes (env , node ):
207
207
if IS_INTEGRATION_DUMP :
208
208
return node
@@ -235,7 +235,7 @@ def is_framework_subfolder(potential_subfolder):
235
235
return (os .path .commonpath ([FRAMEWORK_SDK_DIR ]) ==
236
236
os .path .commonpath ([FRAMEWORK_SDK_DIR , potential_subfolder ]))
237
237
238
- # Cache für Framework-Erkennung
238
+ # Cache for framework detection
239
239
_current_env_frameworks = None
240
240
241
241
def get_frameworks_in_current_env ():
@@ -266,7 +266,7 @@ def call_compile_libs():
266
266
print (f"*** Compile Arduino IDF libs for { pioenv } ***" )
267
267
SConscript ("espidf.py" )
268
268
269
- # Hauptlogik für Framework-Neuinstallation
269
+ # Main logic for framework reinstallation
270
270
if check_reinstall_frwrk ():
271
271
envs = [section .replace ("env:" , "" ) for section in config .sections ()
272
272
if section .startswith ("env:" )]
@@ -279,7 +279,7 @@ def call_compile_libs():
279
279
280
280
print ("*** Reinstall Arduino framework ***" )
281
281
282
- # Parallele Löschung vorbereiten
282
+ # Prepare parallel deletion
283
283
dirs_to_remove = [
284
284
platform .get_package_dir ("framework-arduinoespressif32" ),
285
285
platform .get_package_dir ("framework-arduinoespressif32-libs" )
@@ -289,7 +289,7 @@ def call_compile_libs():
289
289
if exists (dir_path ):
290
290
shutil .rmtree (dir_path )
291
291
292
- # URLs extrahieren und installieren
292
+ # Extract URLs and install
293
293
arduino_frmwrk_url = str (platform .get_package_spec ("framework-arduinoespressif32" )).split ("uri=" , 1 )[1 ][:- 1 ]
294
294
arduino_frmwrk_lib_url = str (platform .get_package_spec ("framework-arduinoespressif32-libs" )).split ("uri=" , 1 )[1 ][:- 1 ]
295
295
@@ -303,7 +303,7 @@ def call_compile_libs():
303
303
if flag_custom_sdkconfig and not flag_any_custom_sdkconfig :
304
304
call_compile_libs ()
305
305
306
- # Finale Ausführung
306
+ # Final execution
307
307
pioframework = env .subst ("$PIOFRAMEWORK" )
308
308
arduino_lib_compile_flag = env .subst ("$ARDUINO_LIB_COMPILE_FLAG" )
309
309
0 commit comments