Skip to content
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

Size should be calculate after confirm the final start address #10448

Merged
merged 2 commits into from Apr 30, 2019

Conversation

Projects
None yet
7 participants
@fredlee12001
Copy link
Contributor

commented Apr 22, 2019

Description

The final size maybe wrong if we caculate the size before start address.
Since the start address may shift after align operation, then the final size/post address should shift as well.

Pull request type

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

Reviewers

Release Notes

@fredlee12001 fredlee12001 changed the title Size should be calculate after confirm the start address Size should be calculate after confirm the final start address Apr 22, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Apr 22, 2019

@fredlee12001, thank you for your changes.
@ARMmbed/mbed-os-tools @ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested review from ARMmbed/mbed-os-maintainers Apr 22, 2019

@bulislaw

This comment has been minimized.

Copy link
Member

commented Apr 24, 2019

@bridadan please review

@bridadan
Copy link
Contributor

left a comment

This looks like a correct fix. Before this comes in, would you mind posting a before and after log of the region output? I'm specifically interested in the following part, which is found at the top of the log when running mbed compile from a project that uses a bootloader:

$ mbed compile
[mbed] Working path "C:\Users\bridan01\onedrive_arm\Documents\dev\mbed-cloud-client-example" (program)
Building project mbed-cloud-client-example (K64F, ARMC6)
Scan: mbed-cloud-client-example
Using ROM regions bootloader, header, application in this build.
  Region bootloader: size 0x8000, offset 0x0
  Region header: size 0x70, offset 0xa000
  Region application: size 0xf5c00, offset 0xa400
@fredlee12001

This comment has been minimized.

Copy link
Contributor Author

commented Apr 25, 2019

Hi @bridadan ,

Result before the changes:

freli01@Fred-PC:mbed-os-example-blinky$ mbed compile -t GCC_ARM -m K64F
[mbed] Working path "/home/freli01/mbed/customers/RDA/UNO_91H/mbed-os-example-blinky" (program)
[Warning] @,: Compiler version mismatch: Have 7.3.1; expected version >= 6.0.0 and < 7.0.0
Building project mbed-os-example-blinky (K64F, GCC_ARM)
Scan: mbed-os-example-blinky
Using ROM regions bootloader, header, application, post_application in this build.
Region bootloader: size 0x5000, offset 0x0
Region header: size 0x70, offset 0x8000
Region application: size 0xcef80, offset 0x8400
Region post_application: size 0x28c80, offset 0xd7380

Result after the changes:

freli01@Fred-PC:mbed-os-example-blinky$ mbed compile -t GCC_ARM -m K64F
[mbed] Working path "/home/freli01/mbed/customers/RDA/UNO_91H/mbed-os-example-blinky" (program)
[Warning] @,: Compiler version mismatch: Have 7.3.1; expected version >= 6.0.0 and < 7.0.0
Building project mbed-os-example-blinky (K64F, GCC_ARM)
Scan: mbed-os-example-blinky
Using ROM regions bootloader, header, application, post_application in this build.
Region bootloader: size 0x5000, offset 0x0
Region header: size 0x70, offset 0x8000
Region application: size 0xcfc00, offset 0x8400
Region post_application: size 0x28000, offset 0xd8000
Compile [ 0.5%]: mbed_tz_context.c

Test config value been used:

"K64F": {
"target.features_add": ["BOOTLOADER"],
"target.bootloader_img": "k64f-loader.bin",
"target.app_offset": "0x8400",
"target.header_offset": "0x8000",
"target.restrict_size": "0xCFC00"
},

@adbridge

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2019

@fredlee12001 Please add a reasonable description in the corresponding section. Thanks

@bridadan
Copy link
Contributor

left a comment

Looks great, nice work @fredlee12001 !

@adbridge adbridge added needs: CI and removed needs: review labels Apr 26, 2019

@adbridge

This comment has been minimized.

Copy link
Contributor

commented Apr 26, 2019

ci started

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 29, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 merged commit 8a92271 into ARMmbed:master Apr 30, 2019

26 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage Success
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8602 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8448B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.