-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix MBED_RAM_START/MBED_RAM_SIZE symbol generation #10008
Conversation
@ccli8, thank you for your changes. |
tools/toolchains/mbed_toolchain.py
Outdated
@@ -872,7 +872,7 @@ def add_regions(self): | |||
"s" if len(regions) > 1 else "", | |||
", ".join(r.name for r in regions) | |||
)) | |||
self._add_all_regions(regions, "MBED_RAM") | |||
self._add_all_regions(regions, "MBED_RAM_APP") |
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'm not keen to make this change yet. While we certainly will get to a point where we have application's ram separated from physical ram, we have no configuration for that use right now. Your proposal to use mbed_ram_start
and mbed_ram_size
for this purpose will:
- Break any project that depends on those configuration settings current behavior.
- Be inconsistent with
mbed_rom_start
andmbed_rom_size
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.
This is to fix duplicate MBED_RAM_START
symbol in .profile-ld
. Would you point out another solution to it?
Based on the description in #9716 I would expect this PR to rename the C flag |
@theotherjimmy Please correct me for my understanding:
Then to address #9716, how to make |
@ccli8 I would do something like:
Does that help? |
6d40abe
to
109df24
Compare
@theotherjimmy Follow your suggestion but implement with another approach by skipping duplicate |
@ccli8 Could you update the PR description to reflect the affects of this PR? Nice diff BTW. Clever. |
@ccli8 Reading through the related code, I think this may have the unintended side affect of never passing CMSIS defined RAM to the linker. Sorry for being blunt, I can't think of a better way of wording this right now. How have you tested this? |
@theotherjimmy To verify it, I check build-tool generated symbols in .profile-c and .profile-ld:
|
@theotherjimmy Update done |
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.
Diff looks great. Thanks!
Needs rebase |
109df24
to
a235019
Compare
@0xc0170 Rebase done |
CI started |
Test run: SUCCESSSummary: 13 of 13 test jobs passed |
@ccli8 Can you please rebase? Latest PR to the tools (fix) created this conflict. sorry about that, should move to CI asap and merge. |
a235019
to
39e92f8
Compare
@0xc0170 Rebase done |
CI restarted |
Test run: FAILEDSummary: 6 of 9 test jobs failed Failed test jobs:
|
CI Restarted |
Test run: FAILEDSummary: 1 of 13 test jobs failed Failed test jobs:
|
io serial for one device (networking tests), will restart |
@ccli8 Let's wait until we finalize rc4 , to avoid rebasing/CI as we might have another config fix. Will go to CI as soon as 5.12 rc4 is completed. Sorry about it, this week landed lot of fixes to config for 5.12.0 resulting in conflicts with this PR. |
Rebase when able. RC4 has since been made and merged. |
1. Fix MBED_RAM_START/MBED_RAM_SIZE are not generated when there are target.mbed_ram_start/target.mbed_ram_size overrides 2. Fix MBED_RAM_START/MBED_RAM_SIZE are duplicated.
39e92f8
to
da7035e
Compare
@cmonr Rebase done. |
CI started |
Test run: SUCCESSSummary: 13 of 13 test jobs passed |
Fix MBED_RAM_START/MBED_RAM_SIZE symbol generation
Description
This PR tries to fix #9716 with build tool-generated
MBED_RAM_START
/MBED_RAM_SIZE
symbols passed to C/C++ and linker files. It has the effects:MBED_RAM_START
/MBED_RAM_SIZE
symbols are not passed to C/C++ file (see build tool-generated .profile-c/.profile-cxx) when there aretarget.mbed_ram_start
/target.mbed_ram_size
overrides.MBED_RAM_START
/MBED_RAM_SIZE
symbols passed to linker file (see build tool-generated .profile-ld).Pull request type
Related issue or PR
#10004
#9716