mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[ci] Added customs RAM and ROM sections to the metric system
This commit is contained in:
@@ -118,6 +118,7 @@ parser.add_argument('files', type=str, nargs='+', help='an ELF file')
|
||||
parser.add_argument('--labels', type=str, nargs='+', help='label for ELF file')
|
||||
parser.add_argument('--sections', type=str, nargs='+', help='Section (prefix) to list')
|
||||
parser.add_argument('--escape', action='store_true', help='Escape the output')
|
||||
parser.add_argument('--custom', type=str, action='append', nargs='+', help='Custom sections, made from the addition of other sections.')
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
@@ -128,7 +129,14 @@ for i,filename in enumerate(args.files):
|
||||
label = os.path.basename(filename)
|
||||
if args.labels and i < len(args.labels):
|
||||
label = args.labels[i]
|
||||
table.append({'label': label, 'values': row_for_elf(filename, args.sections)})
|
||||
values = row_for_elf(filename, args.sections)
|
||||
for custom_section in args.custom:
|
||||
if (len(custom_section) >= 2):
|
||||
custom_section_size = 0
|
||||
for i in range(len(custom_section) - 1):
|
||||
custom_section_size += values[custom_section[i + 1]]
|
||||
values[custom_section[0]] = custom_section_size
|
||||
table.append({'label': label, 'values': values})
|
||||
formatted_table = format_table(table)
|
||||
|
||||
if args.escape:
|
||||
|
||||
Reference in New Issue
Block a user