Skip to content

Commit 0831911

Browse files
authored
Update adafruit_avrprog.py
Added support for Record type 4, as described here: https://en.wikipedia.org/wiki/Intel_HEX#Record_types
1 parent c243131 commit 0831911

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

adafruit_avrprog.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,10 @@ def read_hex_page(file_state, page_addr, page_size, page_buffer):
420420
continue
421421
if rec_type == 3: # sometimes appears, we ignore this
422422
continue
423+
if rec_type == 4:
424+
file_state["ext_addr"] = int(line[9:13], 16) << 16
425+
#print("ExtLin addr: %05X" % file_state['ext_addr'])
426+
continue
423427
if rec_type != 0: # if not the above or a data record...
424428
raise RuntimeError(
425429
"Unsupported record type %d on line %d" % (rec_type, file_state["line"])

0 commit comments

Comments
 (0)