@@ -25,7 +25,7 @@ class MemapParser(object):
25
25
"""An object that represents parsed results, parses the memory map files,
26
26
and writes out different file types of memory results
27
27
"""
28
-
28
+
29
29
print_sections = ('.text' , '.data' , '.bss' )
30
30
31
31
misc_flash_sections = ('.interrupts' , '.flash_config' )
@@ -38,11 +38,11 @@ class MemapParser(object):
38
38
# sections to print info (generic for all toolchains)
39
39
sections = ('.text' , '.data' , '.bss' , '.heap' , '.stack' )
40
40
41
- def __init__ (self ):
41
+ def __init__ (self , detailed_misc = False ):
42
42
""" General initialization
43
43
"""
44
44
#
45
- self .detailed_misc = False
45
+ self .detailed_misc = detailed_misc
46
46
47
47
# list of all modules and their sections
48
48
self .modules = dict ()
@@ -640,14 +640,10 @@ def main():
640
640
sys .exit (1 )
641
641
642
642
643
- args = parser .parse_args ()
643
+ args = parser .parse_args ()
644
644
645
645
# Create memap object
646
- memap = MemapParser ()
647
-
648
- # Show Misc unfolded
649
- if args .detailed :
650
- memap .detailed_misc = True
646
+ memap = MemapParser (detailed_misc = args .detailed )
651
647
652
648
# Parse and decode a map file
653
649
if args .file and args .toolchain :
0 commit comments