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

Extract scripts more robustly #29

Open
carlosperate opened this issue Nov 24, 2016 · 1 comment
Open

Extract scripts more robustly #29

carlosperate opened this issue Nov 24, 2016 · 1 comment

Comments

@carlosperate
Copy link
Contributor

carlosperate commented Nov 24, 2016

Currently uFlash hexelifies by adding an “extended linear address record type" entry right before the python script starts. The unhexlify function relays on this entry to be immediately before the script, which might not be explicitly declared a second time if the hex file was created or extracted using different methods.

For testing purposes I am attaching a hex file where the data between start of address 0003xxxx and 0x0003e000 is present as such, without a double :020000040003F7 entry:
ubit_flash.txt (just rename from txt to hex).

@carlosperate
Copy link
Contributor Author

carlosperate commented Nov 24, 2016

Right, so I just noticed that #16 has been submitted already to cover this.

I haven't had a chance to look at this properly but it feels slightly over engineered? Unless it's trying to do much more than this, I think all we need to do is traverse the hex file, find all :020000040003F7 entries and then from that line search for the address offset E000 (so a line starting with :10E00000) before any other “extended linear address record type" entry is found.

Does the PR also add the intelhex package dependency? I personally quite like uFlash to be a portable module.

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

1 participant