-
Notifications
You must be signed in to change notification settings - Fork 3k
Always build both .hex and .bin files #13011
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
- This change will cause build-system to produce both .bin and .hex files. - Files are small and their creation is fast, thus there are no negative impact on build time and storage requirements. - .bin files are required for updating the device - .hex files are very handy for post build (external to build system) custom scripts (e.g. image signing) - Configuration still allows selecting either .bin or .hex files, this settings is still relevant as it specifies what file is flashed to a device for tests or by `--flash` argument.
@alzix, thank you for your changes. |
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.
One thing to consider, will need tools team review: how this would work in the online compiler - I recall that was a problem previously - multiple files download , in this case .bin + .hex - or is that handled ?
i'm fine with not modifying online compiler and downloading a single file |
there are multiple build artifacts generated during the build. I supposed only a single file is downloaded. This change will add yet another build artifact - so i do not think we need to change online compiler behaviour. |
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.
It looks to me that this should be compatible with the online compiler as full_path is as it was, we just run additional binary()
I'll run CI shortly but this still needs tools review |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
@Patater please review |
@ARMmbed/mbed-os-tools Please review |
This is probably OK. We are hoping to freeze the legacy tools soon, due to the time and effort it takes to create online releases. If I'm understanding correctly, I don't think affects the online compiler so probably doesn't require an online release. @Patater |
@Patater Please confirm, and we merge this one otherwise will be rejected. |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
I use the NUCLEO-F091RC and after updating to mbed 6.2.0 and using the --flash option, the hex will be copied with precedence to the bin. line 2804 in mbed-cli:
This creates an issue: flashing will not start: the hex stays in the virtual F: folder or I get the message that it is too big.
Copying the bin manually works perfect:
|
If I put line 789 of mbed-os\tools\toolchains\mbed_toolchain.py in comment, it works like before:
Is it possible to make it configurable in mbed_app.json? I tried with:
But this has clearly no effect. |
Thanks @lefebvresam for the report. I can confirm this is an issue for the tools. The logic for flashing is https://github.com/ARMmbed/mbed-cli/blob/master/mbed/mbed.py#L2804 . If hex is found first, it is used otherwise binary. I'll create a revert PR, we shall provide this option with new tools |
Summary of changes
on build time and storage requirements.
scripts (e.g. image signing)
relevant as it specifies what file is flashed to a device for tests or by
--flash
argument.Impact of changes
None
Migration actions required
Documentation
Pull request type
Test results
Reviewers
@donatieng