Browse Source

elf_mem_map: do not output registers in qdirstat output

Yuri D'Elia 3 years ago
parent
commit
8ec4104840
1 changed files with 5 additions and 0 deletions
  1. 5 0
      tools/elf_mem_map

+ 5 - 0
tools/elf_mem_map

@@ -6,6 +6,7 @@ from collections import namedtuple
 from struct import unpack
 import re
 
+SRAM_START = 0x200
 SRAM_OFFSET = 0x800000
 EEPROM_OFFSET = 0x810000
 FILL_BYTE = b'\0'
@@ -342,6 +343,10 @@ def print_qdirstat(grefs):
 
     entries = {}
     for entry in grefs:
+        # do not output registers when looking at space usage
+        if entry.loc < SRAM_START:
+            continue
+
         paths = list(filter(None, re.split(r'[\[\].]', entry.name)))
         base = entries
         for i in range(len(paths) - 1):