File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -561,6 +561,19 @@ def check_lib_archive_exists():
561
561
sys .stderr .write ("Warning! Unknown upload protocol %s\n " % upload_protocol )
562
562
563
563
564
+ def print_firmware_metrics (target , source , env ):
565
+ map_file = os .path .join (env .subst ("$BUILD_DIR" ), "firmware.map" )
566
+ if os .path .isfile (map_file ):
567
+ try :
568
+ import esp_idf_size
569
+ print ("[INFO] Running esp-idf-size on %s" % map_file )
570
+ env .Execute ("$PYTHONEXE -m esp-idf-size \" \" {map_file}\" " )
571
+ except :
572
+ pass
573
+
574
+ env .AlwaysBuild (env .Alias ("firmware-metrics" , None , print_firmware_metrics ))
575
+
576
+
564
577
env .AddPlatformTarget ("upload" , target_firm , upload_actions , "Upload" )
565
578
env .AddPlatformTarget ("uploadfs" , target_firm , upload_actions , "Upload Filesystem Image" )
566
579
env .AddPlatformTarget (
You can’t perform that action at this time.
0 commit comments