Tools/idf_size.py: Support .noinit sections

Closes https://github.com/espressif/esp-idf/issues/8428
This commit is contained in:
Roland Dobai
2022-03-01 18:49:15 +01:00
parent 6fe0f873c2
commit 769335dae3

View File

@@ -233,11 +233,13 @@ class LinkingSections(object):
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\