Skip to content

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

Merged
merged 2 commits into from
Apr 6, 2017
Merged

Conversation

theotherjimmy
Copy link
Contributor

@theotherjimmy theotherjimmy commented Mar 22, 2017

The tools now use the extension provided by OUTPUT_EXT to determine the file
type of the output executable.

Resolves #3973

Testing

  • /morph test

@theotherjimmy
Copy link
Contributor Author

/morph test

@theotherjimmy theotherjimmy changed the title Upgrade OUTPUT_EXT and use it to pick binary type Use OUTPUT_EXT to pick binary type Mar 22, 2017
@theotherjimmy
Copy link
Contributor Author

@maclobdell @0xc0170 @sg- Lets follow discussion from #3973 here.

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 23, 2017

Restarting morph, I could not spot any results there

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1724

Test failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 23, 2017

NRF5x targets fail tests in the failure above, Please have a look

@theotherjimmy
Copy link
Contributor Author

Retrying, as I think I fixed it.

/morph test

@mbed-bot
Copy link

Result: ABORTED

Your command has finished executing! Here's what you wrote!

/morph test

@theotherjimmy
Copy link
Contributor Author

I rebased, so I'm restarting the job.

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1733

All 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.
@theotherjimmy
Copy link
Contributor Author

Had to rebase after #3995 was merged.

@theotherjimmy
Copy link
Contributor Author

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1789

Test failed!

@adbridge
Copy link
Contributor

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1801

All builds and test passed!

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 3, 2017

retest uvisor


with open(binf.replace(".bin", ".hex"), "w") as file_desc:
binh.tofile(file_desc, format='hex')
pass
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment where?

Copy link
Contributor

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.
Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beauty

@theotherjimmy
Copy link
Contributor Author

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@theotherjimmy
Copy link
Contributor Author

/morph test

@mbed-bot
Copy link

mbed-bot commented Apr 5, 2017

[Build ${MBED_BUILD_ID}]
FAILURE: Something went wrong when building and testing.

@theotherjimmy
Copy link
Contributor Author

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

mbed-bot commented Apr 5, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1841

All builds and test passed!

@mbed-bot
Copy link

mbed-bot commented Apr 6, 2017

[Build 1335]
SUCCESS: Building succeeded and tests were run! Be sure to check the test results

@sg- sg- merged commit fdf1ed6 into ARMmbed:master Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants