We use IHEX to load ADSP firmware.
For implementation I used specification here:
http://www.interlog.com/~speff/usefulinfo/Hexfrmt.pdf
Also wiki article may seem useful
https://en.wikipedia.org/wiki/Intel_HEX
Differential D60270
[llvm-objcopy] Add support for Intel HEX output format evgeny777 on Apr 4 2019, 8:37 AM. Authored by
Details We use IHEX to load ADSP firmware. For implementation I used specification here: Also wiki article may seem useful
Diff Detail
Event TimelineComment Actions Thanks for sending this! I assigned PR39841 to you since this should fix that bug. I ran this on some internal ihex files we have, and it seems to be dropping one of the sections, so I'll have to poke around to see what the bug is. But some ihex support is better than none, so it's not necessarily blocking :)
Comment Actions Line parser moved to IHexRecord::parse Comment Actions FYI, most of the other llvm-objcopy developers are still away following Euro LLVM, so it may not be until next week that you get an comments from @rupprecht. I don't currently have time to read up on ihex, I'm afraid, but if you don't get any feedback next week, I'll try to look into it if I have time. Comment Actions
Ah, I see. Ok, there is no rush. Comment Actions Sorry, I should have mentioned earlier that I was going to be busy last week. (In advance: I'm here this week, but I'll be out next week). btw, some people at euro llvm also requested srec supprt, which seems extremely similar to ihex -- so it might be good to think about how generic this handling can be, e.g. maybe most of it should just be a "record" parser which is shared with ihex and srec. I don't think premature specialization should be done to make it more general than it should be, but just don't do anything that would be hostile towards refactoring it :) Comment Actions
For me it doesn't look extremely similar to IHEX, except both formats use hexadecimal byte representation. I think if we implement SREC then part of section builder functionality from IHexELFBuilder::addDataSections can be moved to a common base class, Still I expect writer and parser to be completely separate. Comment Actions There's a lot of code to review here. I'll keep reviewing it everyday but this is going to take a while to review. Any help on splitting this up and making into smaller chunks would be helpful. Splitting reading and writing up into two separate patches would be helpful and removing features that we can add later would be helpful.
Comment Actions
I've responded to some of the comments, meanwhile I'm splitting patch into writer (will go first) and reader (will go next). Will update the review soon
Comment Actions Looked mostly at the test for now, going to take a pass over the code today.
Comment Actions Some insight into the differences:
Comment Actions
Comment Actions I ran a few internal tests and this produces identical ihex output for every file I checked! \ o /
|