Skip to content

Commit

Permalink
Tools/idf_size.py: Support .noinit sections
Browse files Browse the repository at this point in the history
Closes #8428
  • Loading branch information
dobairoland committed Mar 3, 2022
1 parent 6fe0f87 commit 769335d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/idf_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,13 @@ def get_name_score(name): # type: (str) -> int
split_name = section.split('.')
if len(split_name) > 1:
# If the section has a memory type, update the type and try to display the type properly
assert len(split_name) == 3 and split_name[0] == '', 'Unexpected section name'
assert split_name[0] == '', 'Unexpected section name "{}"'.format(section)
memory_name = '.iram' if 'iram' in split_name[1] else\
'.dram' if 'dram' in split_name[1] else\
'.flash' if 'flash' in split_name[1] else\
'.' + split_name[1]
if len(split_name) < 3:
split_name.append('') # in order to avoid failures in the following lines
display_name_list[i] = 'DRAM .' + split_name[2] if 'dram' in split_name[1] else\
'IRAM' + split_name[1].replace('iram', '') + ' .' + split_name[2] if 'iram' in split_name[1] else\
'Flash .' + split_name[2] if 'flash' in split_name[1] else\
Expand Down

0 comments on commit 769335d

Please sign in to comment.