Skip to content

Commit 2b36d2d

Browse files
committed
Moved detailed memap parameter to consturctor
1 parent 99ac966 commit 2b36d2d

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tools/memap.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MemapParser(object):
2525
"""An object that represents parsed results, parses the memory map files,
2626
and writes out different file types of memory results
2727
"""
28-
28+
2929
print_sections = ('.text', '.data', '.bss')
3030

3131
misc_flash_sections = ('.interrupts', '.flash_config')
@@ -38,11 +38,11 @@ class MemapParser(object):
3838
# sections to print info (generic for all toolchains)
3939
sections = ('.text', '.data', '.bss', '.heap', '.stack')
4040

41-
def __init__(self):
41+
def __init__(self, detailed_misc=False):
4242
""" General initialization
4343
"""
4444
#
45-
self.detailed_misc = False
45+
self.detailed_misc = detailed_misc
4646

4747
# list of all modules and their sections
4848
self.modules = dict()
@@ -640,14 +640,10 @@ def main():
640640
sys.exit(1)
641641

642642

643-
args = parser.parse_args()
643+
args = parser.parse_args()
644644

645645
# 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)
651647

652648
# Parse and decode a map file
653649
if args.file and args.toolchain:

0 commit comments

Comments
 (0)