Skip to content

Update linker scripts based on latest PDL 1.3 #11354

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

Merged
merged 2 commits into from
Aug 30, 2019

Conversation

kyle-cypress
Copy link

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 a team August 28, 2019 01:00
@ciarmcom
Copy link
Member

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

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 28, 2019

Needs rebase now

@maclobdell
Copy link
Contributor

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
Copy link
Contributor

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

@maclobdell maclobdell left a comment

Choose a reason for hiding this comment

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

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
Copy link
Author

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

@0xc0170
Copy link
Contributor

0xc0170 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 a team August 29, 2019 11:47
cy-opm and others added 2 commits August 29, 2019 07:15
Allow the application to specify this depending on whether/how
it is using the bootloader and whether it requires a CM0+ image.
@adbridge
Copy link
Contributor

ci started

@mbed-ci
Copy link

mbed-ci commented Aug 29, 2019

Test run: SUCCESS

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

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

Successfully merging this pull request may close these issues.

8 participants