Skip to content

Add binary hook for ARMC6 which use --bincombined for .bin outputs #9320

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

Closed
wants to merge 2 commits into from
Closed

Add binary hook for ARMC6 which use --bincombined for .bin outputs #9320

wants to merge 2 commits into from

Conversation

mikisch81
Copy link
Contributor

@mikisch81 mikisch81 commented Jan 10, 2019

Description

This is needed in order to generate one output file for an image containing multiple load regions, instead of a .bin for each load region.

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@ARMmbed/mbed-os-tools

@mikisch81
Copy link
Contributor Author

@ARMmbed/mbed-os-tools

@cmonr cmonr requested a review from a team January 10, 2019 16:33
@mikisch81
Copy link
Contributor Author

@cmonr looks like that adding reviewers to the description doesn't always work..

@cmonr
Copy link
Contributor

cmonr commented Jan 10, 2019

@mikisch81 A package update caused the reviewer script to be down fore a while, and @adbridge was out sick until today.

@mikisch81
Copy link
Contributor Author

@ARMmbed/mbed-os-tools can you review?

@hook_tool
def binary(self, resources, elf, bin):
_, fmt = splitext(bin)
# On .hex format, combine multiple .hex files (for multiple load regions) into one
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is no longer relevant (after copy-pase from ARMC5 impl)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, after looking at it again, why not change the ARMC5 binary tool?
The ARMC6 class derives from the ARM_STD class which derives from the ARM class.

cmd = [self.elf2bin, bin_arg, '-o', bin, elf]
cmd = self.hook.get_cmdline_binary(cmd)

# remove target binary file/path
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is pretty useless.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will remove it

@mikisch81
Copy link
Contributor Author

@ARMmbed/mbed-os-tools @theotherjimmy
Moved the logic from ARMC6 class to the parent class ARM, can you review again?

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 14, 2019

@mikisch81 are you aware of #5021 (this was closed, there was a comment from @c1728p9 about LPC board, please review).

@mikisch81
Copy link
Contributor Author

@0xc0170 No I was not aware.
@ARMmbed/mbed-os-tools can you suggest what's the way forward?

@mikisch81
Copy link
Contributor Author

@0xc0170 @ARMmbed/mbed-os-tools Closing this PR as I was able to build TFM secure code with just 1 load region.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants