From 8ec4104840bb26f1c96a3268c91953ba6c92ed3b Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Sun, 6 Jun 2021 12:20:50 +0200 Subject: [PATCH] elf_mem_map: do not output registers in qdirstat output --- tools/elf_mem_map | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/elf_mem_map b/tools/elf_mem_map index f3ea03d0..2a7e8c30 100755 --- a/tools/elf_mem_map +++ b/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):