@@ -225,7 +225,7 @@ def __fetch_fs_size(target, source, env):
225
225
board = env .BoardConfig ()
226
226
mcu = board .get ("build.mcu" , "esp32" )
227
227
toolchain_arch = "xtensa-%s" % mcu
228
- filesystem = board .get ("build.filesystem" , "spiffs " )
228
+ filesystem = board .get ("build.filesystem" , "littlefs " )
229
229
if mcu in ("esp32c2" , "esp32c3" , "esp32c5" , "esp32c6" , "esp32h2" , "esp32p4" ):
230
230
toolchain_arch = "riscv32-esp"
231
231
@@ -306,7 +306,7 @@ def check_lib_archive_exists():
306
306
return True
307
307
#print("lib_archive was not found in platformio.ini")
308
308
return False
309
-
309
+
310
310
if not check_lib_archive_exists ():
311
311
env_section = "env:" + env ["PIOENV" ]
312
312
projectconfig .set (env_section , "lib_archive" , "False" )
@@ -367,10 +367,13 @@ def firmware_metrics(target, source, env):
367
367
if os .path .isfile (map_file ):
368
368
try :
369
369
import subprocess
370
+ python_exe = env .subst ("$PYTHONEXE" )
371
+ run_env = os .environ .copy ()
372
+ run_env ["PYTHONIOENCODING" ] = "utf-8"
370
373
# Show output of esp_idf_size, but suppresses the command echo
371
374
subprocess .run ([
372
- env . subst ( "$PYTHONEXE" ) , "-m" , "esp_idf_size" , "--ng" , map_file
373
- ], check = False )
375
+ python_exe , "-m" , "esp_idf_size" , "--ng" , map_file
376
+ ], env = run_env , check = False )
374
377
except Exception :
375
378
print ("Warning: Failed to run firmware metrics. Is esp-idf-size installed?" )
376
379
pass
0 commit comments