Skip to content

Storage features: fix static pin-map for ARMC5 #12117

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 1 commit into from
Dec 16, 2019

Conversation

mprse
Copy link
Contributor

@mprse mprse commented Dec 16, 2019

Summary of changes

constexpr specified can not be used with ARMC5 compiler and is causing build failures.
Switching constexpr to const should not consume extra ROM (in case of ARMC6) and should be ok to ARMC5.

Impact of changes

Migration actions required

Documentation


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


@adbridge adbridge requested review from kjbracey and a team December 16, 2019 14:54
@kjbracey
Copy link
Contributor

Negative side-effect for ARMC5 is that static_spi_pinmap and the HAL SPI pinmap table and computation code will be pulled in even if not referenced.

In theory, removing the constexpr would permit the same effect to happen on other compilers with badly-written HALs - removing the constexpr gets rid of the check that get_spi_pinmap is compile-time, not runtime.

But I guess we'd spot that in code size if it occurred. (Or maybe we have Greentea tests that check the get_pinmaps really are constexpr?)

@adbridge
Copy link
Contributor

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 16, 2019

Test run: SUCCESS

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

@adbridge adbridge merged commit c374f52 into ARMmbed:master Dec 16, 2019
@0xc0170
Copy link
Contributor

0xc0170 commented Dec 16, 2019

fixes #12103 ?

@mprse
Copy link
Contributor Author

mprse commented Dec 16, 2019

fixes #12103 ?

I believe it does.

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.

5 participants