Skip to content

Commit

Permalink
Merge pull request #2494 from theotherjimmy/fix-memap-table
Browse files Browse the repository at this point in the history
Print module information in 'table' output format
  • Loading branch information
0xc0170 authored Aug 19, 2016
2 parents b233da0 + 74dd5ef commit 5c82db8
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tools/memap.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,6 @@ def generate_output(self, export_format, file_output=None):
for i in sorted(self.modules):

row = []
row.append(i)

for k in self.sections:
subtotal[k] += self.modules[i][k]

for k in self.print_sections:
row.append(self.modules[i][k])

json_obj.append({
"module":i,
Expand Down Expand Up @@ -530,6 +523,16 @@ def generate_table(self, subtotal, misc_flash_mem, file_desc):
for i in list(self.print_sections):
table.align[i] = 'r'

for i in sorted(self.modules):
row = [i]

for k in self.sections:
subtotal[k] += self.modules[i][k]

for k in self.print_sections:
row.append(self.modules[i][k])

table.add_row(row)

subtotal_row = ['Subtotals']
for k in self.print_sections:
Expand Down

0 comments on commit 5c82db8

Please sign in to comment.