Skip to content

Add decoding support for Record Type 4 #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions adafruit_avrprog.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ def _busy_wait(self):


def read_hex_page(file_state, page_addr, page_size, page_buffer):
# pylint: disable=too-many-branches
"""
Helper function that does the Intel Hex parsing. Takes in a dictionary
that contains the file 'state'. The dictionary should have file_state['f']
Expand Down Expand Up @@ -420,6 +421,10 @@ def read_hex_page(file_state, page_addr, page_size, page_buffer):
continue
if rec_type == 3: # sometimes appears, we ignore this
continue
if rec_type == 4:
file_state["ext_addr"] = int(line[9:13], 16) << 16
# print("ExtLin addr: %05X" % file_state['ext_addr'])
continue
if rec_type != 0: # if not the above or a data record...
raise RuntimeError(
"Unsupported record type %d on line %d" % (rec_type, file_state["line"])
Expand Down