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

armcc - remove fromelf output before regenerating one #6344

Merged
merged 1 commit into from Mar 21, 2018

Conversation

Projects
None yet
6 participants
@tung7970
Contributor

tung7970 commented Mar 13, 2018

Description

Fix armcc recompile errors during elf2bin stage. Errors shown as follows:

Elf2Bin: mbed-os-example-wifi
Error: Q0147E: Failed to create Directory .\BUILD\REALTEK_RTL8195AM\ARM\mbed-os-example-wifi.bin\IMAGE2_TABLE: File exists
Finished: 0 information, 0 warning and 1 error messages.
[ERROR] Error: Q0147E: Failed to create Directory .\BUILD\REALTEK_RTL8195AM\ARM\mbed-os-example-wifi.bin\IMAGE2_TABLE: File exists
Finished: 0 information, 0 warning and 1 error messages.

Fix issue #6306

Pull request type

  • Fix
  • Refactor
  • New target
  • Feature
  • Breaking change
@0xc0170

This comment has been minimized.

Member

0xc0170 commented Mar 13, 2018

This is related, similar change that resulted in this issue #5537 , see #5021

In the issue 6306:

I personally prefer option 2 since it solves the problem and also makes armcc behave like the rest

How is it with rest ? IAR and GCC ARM?

@samchuarm

This comment has been minimized.

samchuarm commented Mar 16, 2018

@theotherjimmy

Excerpts from prior PRs that proposed the same change:

Typically when there are multiple LRs and building creates a directory rather than a binary it indicates something is wrong in the scatter file. Adding this change may mask scatter file errors. Rather than having an obvious error at compile time, a binary will be created that does not work.

It looks like the LPC4088_DM's post build hook makes use of multiple regions being created if the binary is big enough. It does this by manually combining the regions with little padding (up to 512K). With this PR padding is done automatically, but rather than 512K it pads the entire address space from LR_IROM1 to LR_IROM which is ~640MB.

How do you plan on correcting that behavior for the LPC4088_DM? How do you plan on making this change in a way that is backwards compatible? Could using a .hex file be a viable workaround?

@samchuarm

This comment has been minimized.

samchuarm commented Mar 20, 2018

Hi @tung7970 could you please help comment on @0xc0170 @theotherjimmy questions? Thanks.

armcc - remove fromelf output before regenerating
Fix armcc recompile errors during elf2bin stage. Errors shown as follows:

Elf2Bin: mbed-os-example-wifi
Error: Q0147E: Failed to create Directory .\BUILD\REALTEK_RTL8195AM\ARM\mbed-os-example-wifi.bin\IMAGE2_TABLE: File exists
Finished: 0 information, 0 warning and 1 error messages.
[ERROR] Error: Q0147E: Failed to create Directory .\BUILD\REALTEK_RTL8195AM\ARM\mbed-os-example-wifi.bin\IMAGE2_TABLE: File exists
Finished: 0 information, 0 warning and 1 error messages.

Signed-off-by: Tony Wu <tonywu@realtek.com>

@tung7970 tung7970 force-pushed the tung7970:fix-tools branch from 893a37d to cca1d55 Mar 20, 2018

@tung7970

This comment has been minimized.

Contributor

tung7970 commented Mar 20, 2018

@0xc0170 So far, only ARMCC creates directory if there are multiple load regions.
@theotherjimmy The other solution is to remove output file/directory before regenerating one. Please see the revised patch. This should be backward compatible and target independent.

@tung7970 tung7970 changed the title from armcc - generates one output file for multiple load regions to armcc - remove fromelf output before regenerating one Mar 20, 2018

@theotherjimmy

Looks good. Thanks!

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Mar 20, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Mar 20, 2018

Build : SUCCESS

Build number : 1496
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6344/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr cmonr added ready for merge and removed needs: review labels Mar 21, 2018

@0xc0170 0xc0170 merged commit 7125c8a into ARMmbed:master Mar 21, 2018

11 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Local events testing has passed
Details
travis-ci/littlefs Passed, code size is 10060B (+0.00%)
Details
travis-ci/tools Local tools testing has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment