-
Notifications
You must be signed in to change notification settings - Fork 3k
Use OUTPUT_EXT to pick binary type #3994
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
/morph test |
7381a50
to
f0d1a79
Compare
@maclobdell @0xc0170 @sg- Lets follow discussion from #3973 here. |
Result: FAILUREYour command has finished executing! Here's what you wrote!
|
Restarting morph, I could not spot any results there /morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputTest failed! |
NRF5x targets fail tests in the failure above, Please have a look |
Retrying, as I think I fixed it. /morph test |
f6b1353
to
0ad5e3a
Compare
Result: ABORTEDYour command has finished executing! Here's what you wrote!
|
I rebased, so I'm restarting the job. /morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
targets.json contained a key for some targets, `OUTPUT_EXT`, which I moved to `Target`, the root of all targets. Following on that, the tools now use this extension provided by `OUTPUT_EXT` to determine the file type of the output executable.
0ad5e3a
to
356575c
Compare
Had to rebase after #3995 was merged. |
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputTest failed! |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
retest uvisor |
tools/targets/__init__.py
Outdated
|
||
with open(binf.replace(".bin", ".hex"), "w") as file_desc: | ||
binh.tofile(file_desc, format='hex') | ||
pass |
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.
@theotherjimmy At this point can we just remove this function? Or would you prefer to do this in another PR?
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.
We cannot remove this function, as older versions of targets.json
will expect it to exist.
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.
@theotherjimmy Might be a good idea to add a comment detailing this?
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.
A comment where?
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.
In/above the function. Something along the lines of "This function is necessary to maintain backwards compatibility with older version of targets.json
" ?
The input format is now determined by the OUTPUT_EXT key in targets.json, and defaults to "bin" when not specified. This changes the Teensy3_1 and the NRF51x targets' post bulid hooks. Teensy3_1 just converted to intelhex, so we do nothing instead. NRF51x assumed that it was taking in a bin format file. I made it detect file type by extension.
356575c
to
74998d6
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.
Beauty
@mbed-bot: TEST HOST_OSES=ALL |
/morph test |
[Build ${MBED_BUILD_ID}] |
@mbed-bot: TEST HOST_OSES=ALL |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
[Build 1335] |
The tools now use the extension provided by
OUTPUT_EXT
to determine the filetype of the output executable.
Resolves #3973
Testing