Skip to content
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

uf2conv.py : Segment address of hex format must be added to address of each records #54

Closed
elfmimi opened this issue Jun 17, 2021 · 1 comment

Comments

@elfmimi
Copy link

elfmimi commented Jun 17, 2021

Sorry, I should have provided more thorough description in the previous issue #53 .

addr = upper | (rec[1] << 8) | rec[2]

In this line above, it should be numerical addition.

so it must be like ...

addr = upper + ((rec[1] << 8) | rec[2] )

segment address must be multiplied by 16 and added to each subsequent data record address.

cf. https://en.wikipedia.org/wiki/Intel_HEX

@mmoskal
Copy link
Member

mmoskal commented Jun 17, 2021

Oh, I see, this is why the assertion was there :)

Fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants