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

Update linker scripts based on latest PDL 1.3 #11354

Merged
merged 2 commits into from Aug 30, 2019

Conversation

@kyle-cypress
Copy link

commented Aug 27, 2019

Description

This depends on PDL update (#11326 ) and BSP restructure (#11323 ). The PR branch is based off of the branch for #11323 because the diff does not apply cleanly to master. The unique commit is
f276f8a . It will be rebased once those PRs are merged.

Pull request type

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

Reviewers

@ARMmbed/team-cypress

Release Notes

@ciarmcom ciarmcom requested review from maclobdell and ARMmbed/mbed-os-maintainers Aug 28, 2019
@ciarmcom

This comment has been minimized.

Copy link
Member

commented Aug 28, 2019

@kyle-cypress, thank you for your changes.
@maclobdell @ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-pan please review.

@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 28, 2019

Needs rebase now

@maclobdell

This comment has been minimized.

Copy link
Contributor

commented Aug 28, 2019

I'm testing out the linker changes. Specifically testing a pre-built bootloader and pelion client example application for CY8CPROTO_062_4343W with GCC_ARM compiler. I'm testing off of 5.13.x with just this linker update made. (My mbed_app.json sets mbed_rom_start to 0x10000000. This would be better to be located in targets.json.)

With the linker changes applied, I get the following error.

Merging Regions
  Filling region bootloader1 with D:\maclobdell\mbed-os-pelion-example\bootloader/mbed-bootloader_cy8cproto.hex
  Skipping bootloader2 as it is merged previously
  Filling region header with .\BUILD\CY8CPROTO_062_4343W\GCC_ARM-RELEASE\mbed-os-pelion-example_header.hex
  Filling region application with .\BUILD\CY8CPROTO_062_4343W\GCC_ARM-RELEASE\mbed-os-pelion-example_application.hex
[ERROR] Data overlapped at address 0x10000000

This is because the pre-built bootloader file fills the area 0x10000000 - 0x1000C000. It already has the CM0+ area in it. But now the application is being built with the CM0+ in it.

So, are you proposing that when building the bootloader project, it does not include the CM0+ area? This is very possible, but I'm not sure your proposed changes provide a clear method for handling this situation.

@maclobdell

This comment has been minimized.

Copy link
Contributor

commented Aug 28, 2019

After additional testing, I think the linker changes are okay.

After adding this to mbed_app.json for an application project, it successfully combines with a pre-built bootloader (which already has the CM0+ area added).

     "target.extra_labels_remove"                : ["CM0P_SLEEP"]         
Copy link
Contributor

left a comment

More additional settings might be required to enable bootloader support, but for now the linker changes look good.

Please document this on the board platform page.

            "target.extra_labels_remove"                : ["CM0P_SLEEP"]         
@kyle-cypress kyle-cypress force-pushed the kyle-cypress:pr/pdl-linker-script branch from f276f8a to 3d8653c Aug 28, 2019
@kyle-cypress

This comment has been minimized.

Copy link
Author

commented Aug 29, 2019

Rebased on the rollup branch from #11367 . Added 3d8653c to address the bootloader issue discussed above by @cy-opm and @maclobdell .

@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 29, 2019

@kyle-cypress Some PRs were integrated but looks like not properly so Github does not recognize them. Please rebase this one again

@0xc0170 0xc0170 removed the request for review from ARMmbed/mbed-os-pan Aug 29, 2019
cy-opm and others added 2 commits Aug 27, 2019
Allow the application to specify this depending on whether/how
it is using the bootloader and whether it requires a CM0+ image.
@kyle-cypress kyle-cypress force-pushed the kyle-cypress:pr/pdl-linker-script branch from 3d8653c to bf00ebe Aug 29, 2019
@kyle-cypress kyle-cypress referenced this pull request Aug 29, 2019
@0xc0170 0xc0170 added needs: CI and removed needs: work labels Aug 29, 2019
@adbridge

This comment has been minimized.

Copy link
Contributor

commented Aug 29, 2019

ci started

@mbed-ci

This comment has been minimized.

Copy link

commented Aug 29, 2019

Test run: SUCCESS

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

@0xc0170 0xc0170 merged commit 6805486 into ARMmbed:master Aug 30, 2019
25 checks passed
25 checks passed
continuous-integration/jenkins/pr-head This commit looks good
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 RTOS ROM(+0 bytes) RAM(+72 bytes)
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 8615 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 8464B.
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
Projects
None yet
8 participants
You can’t perform that action at this time.