Show size of non-relocatable runtime code during build.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 26 Sep 2010 22:32:13 +0000 (18:32 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 26 Sep 2010 22:32:13 +0000 (18:32 -0400)
tools/checkrom.py

index 6309528e308bb46b99a5f1576af74127f26ca9f1..69d65e8d935fd5a734c72704544a7ada79516a61 100755 (executable)
@@ -46,8 +46,11 @@ def main():
         sys.exit(1)
 
     # Print statistics
-    print "Total size: %d  Free space: %d  Percent used: %.1f%% (%dKiB rom)" % (
-        datasize, finalsize - datasize
+    runtimesize = datasize
+    if '_reloc_abs_start' in symbols:
+        runtimesize = end - symbols['code32init_end'].offset
+    print "Total size: %d  Fixed: %d  Free: %d (used %.1f%% of %dKiB rom)" % (
+        datasize, runtimesize, finalsize - datasize
         , (datasize / float(finalsize)) * 100.0
         , finalsize / 1024)