-
Notifications
You must be signed in to change notification settings - Fork 3k
PSOC6: correctly align hex files with split text sections #9781
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
When the original PSOC6 CM4 hex file contains unalinged text sections that span through multiple intelhex segments, aligned segments (filled with zeroes) overlap with the original data segments, resulting in error thrown by ihex.merge(alignments, overlap='error'). Such hex file can be produced when the ELF is built with ARM MDK Compiler with --split_sections option: http://www.keil.com/support/man/docs/armcc/armcc_chr1359124944914.htm Change the merge strategy to overlap='ignore', so that the overlapping zero-filled segments are skipped.
Split section is always enabled for mbed-os/tools/profiles/develop.json Line 29 in b088bd4
|
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.
I would defer to @vmedcy and @deepikabhavnani in this case, its a bit target-specific for me.
The issue with unaligned HEX segments was first observed by Cypress BLE development team that tried to include prebuilt BLE stack controller library in GCC_ARM build. The stack library was precompiled using ARM Compiler 5 (with --split_sections option), then linked with arm-none-eabi-gcc using standard |
@vmedcy - Thanks for explanation |
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.
👍
CI started |
Test run: SUCCESSSummary: 12 of 12 test jobs passed |
Description
When the original PSOC6 CM4 hex file contains unalinged text sections
that span through multiple intelhex segments, aligned segments (filled
with zeroes) overlap with the original data segments, resulting in
error thrown by ihex.merge(alignments, overlap='error').
Such hex file can be produced when the ELF is built with ARM MDK Compiler
with --split_sections option:
http://www.keil.com/support/man/docs/armcc/armcc_chr1359124944914.htm
Change the merge strategy to overlap='ignore', so that the overlapping
zero-filled segments are skipped.
Pull request type
Reviewers
Release Notes