-
Notifications
You must be signed in to change notification settings - Fork 3k
Use pyelftools for Realtek post-build script #6621
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
Conversation
@samchuarm @ARMmbed/team-realtek |
Hi @ARMmbed/team-realtek , please review the changes and provide your feedback if any. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the effort. It looks much nicer.
One small thing, shouldn't the 'attr' variable be better named 'addr' in function _parse_load_segment_inner ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 simplification, elftools 💯
@tung7970 Yes, that's a typo. I'll fix that now. |
8a176d7
to
a0b305b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Interesting. Why does the code now no longer need to check compilers? /morph build |
The new script checks the elf file directly rather than output from each compiler’s elf dumper. |
Build : SUCCESSBuild number : 1766 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1403 |
Test : SUCCESSBuild number : 1575 |
@theotherjimmy Is this fixing #5976 ?? |
Yes, but I want to verify that once this goes live on the website, so I omitted a "Resolves" directive. |
Description
The online compiler can be very picky about what is and is not allowed in a post-build scirpt. For a while now, the Realtek post-build script has been preventing anyone from successfully compiling for the RTL8195AM in the online compiler. This refactor changes the code that was failing to be much simpler, and it works in the website. I have tested this on a staging site.
For reference, the traceback:
Error 127 is "command not found" https://stackoverflow.com/questions/1763156/127-return-code-from#1763178. I fixed this by refactoring so that we don't use any commands.
Pull request type
[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change