Skip to content

Commit 0788f6c

Browse files
committed
adding error handling in case segment is not supported for mapping to section yet
1 parent bba6d3c commit 0788f6c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

esp32_image_parser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ def image2elf(filename, output_file, verbose=False):
9696
section_name = '.iram0.text'
9797
iram_seen = True
9898
else:
99-
section_name = section_map[segment_name]
99+
if segment_name in section_map:
100+
section_name = section_map[segment_name]
101+
else:
102+
print("Unsure what to do with segment: " + segment_name)
100103

101104
# if we have a mapped segment <-> section
102105
# add the elf section

0 commit comments

Comments
 (0)