-
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
NRF: Migrate ARM Compiler 5 feature re-locate zero initialized variables #13047
Conversation
@hugueskamba you might want to pick a different reviewer :) - not really up to date with the codebase these days |
@hugueskamba, thank you for your changes. |
@@ -48,7 +48,7 @@ | |||
#endif | |||
|
|||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) | |||
__attribute__ ((section(".bss.nvictable"),zero_init)) | |||
__attribute__ ((section(".bss.nvictable"))) |
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.
While here I'd strip the above test down to defined(__ARMCC_VERSION)
. That sort of stripping has already occurred in the core codebase.
(That form of the test was always weird - it means "ARMC5 or (ARMC and ARMC6)". Trying to construct a complicated test for "any version of ARMC" with a perfectly good test for "any version of ARMC" in the middle of it - __ARMCC_VERSION being defined).
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.
Done.
ARM Compiler 6 does not support placing a zero-initialized variable in a zero-initialized section with a given name. The migration path for this feature is what is as done in this commit. The name of the section is what comes after `.bss.` (`nvictable` in this case). Also simplify pre-processor directive to test for Arm compiler.
2032bbf
to
488f06b
Compare
CI started |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
This PR does not contain release version label after merging. |
Summary of changes
ARM Compiler 6 does not support placing a zero-initialized variable in a
zero-initialized section with a given name.
The migration path for this feature is what is as done in this commit.
The name of the section is what comes after
.bss.
(nvictable
in thi case).Impact of changes
Removes the following warning:
unknown attribute 'zero_init' ignored [-Wunknown-attributes]
Migration actions required
n/a
Documentation
n/a
Pull request type
Test results
Reviewers
@drahnr