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

NRF: Migrate ARM Compiler 5 feature re-locate zero initialized variables #13047

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

hugueskamba
Copy link
Collaborator

@hugueskamba hugueskamba commented May 30, 2020

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

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@drahnr


@drahnr
Copy link
Contributor

drahnr commented May 30, 2020

@hugueskamba you might want to pick a different reviewer :) - not really up to date with the codebase these days

@ciarmcom
Copy link
Member

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

@ciarmcom ciarmcom requested a review from a team May 30, 2020 23:00
@@ -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")))
Copy link
Contributor

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).

Copy link
Collaborator Author

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.
@mergify mergify bot added needs: CI and removed needs: review labels Jun 1, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Jun 4, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Jun 4, 2020

Test run: SUCCESS

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

@0xc0170 0xc0170 added the release-type: patch Indentifies a PR as containing just a patch label Jun 5, 2020
@0xc0170 0xc0170 merged commit 65cbf97 into ARMmbed:master Jun 5, 2020
@mergify mergify bot added release version missing When PR does not contain release version, bot should label it and we fix it afterwards and removed ready for merge labels Jun 5, 2020
@mergify
Copy link

mergify bot commented Jun 5, 2020

This PR does not contain release version label after merging.

@hugueskamba hugueskamba deleted the hk_nrf_arm_compiler branch June 5, 2020 23:51
@adbridge adbridge added release-version: 6.1.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Jun 24, 2020
@0xc0170 0xc0170 removed the release version missing When PR does not contain release version, bot should label it and we fix it afterwards label Jun 22, 2021
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.

None yet

7 participants