Skip to content

µVision export: Handle more C++ language standards #11225

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
Aug 29, 2019

Conversation

kjbracey
Copy link
Contributor

@kjbracey kjbracey commented Aug 14, 2019

Description

µVision 5.28a now has options for gnu++14, c++14 and c++17, so we can use them rather than falling back to c++14 or gnu++11.

This does mean that an export of current master, which uses gnu++14, will now require version 5.28a. I have not tested what happens if 5.27 is given a project file with these new option numbers.

However, export of current master is broken for 5.27 anyway, as the fallback to gnu++11 means it fails to compile the C++14 constructs now in the codebase.

Fixes #11217, as long as users update µVision too.

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Release Notes

  • Mbed OS now uses C++11 language and C++14 library constructs, so requires the C++ compiler to be set to C++14 standard or later. Custom build profiles that select C++98 or C++11 are no longer supported. (ARMC5 should work in its C++11 mode, as C++14 library replacements are provided in-tree, but ARMC5 is not officially supported).
  • µVision export now requires MDK 5.28a or later, as -std=gnu++14 mode cannot be selected in earlier versions. In Mbed OS 5.13, the µVision exporter was selecting -std=gnu++11, but this is no longer sufficient.

µVision 5.28a now has options for gnu++14, c++14 and c++17, so we can
use them rather than falling back to c++14 or gnu++11.

This does mean that an export of current master, which uses gnu++14,
will now require version 5.28a. I have not tested what happens if
5.27 is given a project file with these new option numbers.

However, export of current master is broken for 5.27 anyway, as the
fallback to gnu++11 means it fails to compile the C++14 constructs
now in the codebase.

Fixes ARMmbed#11217, as long as users update µVision too.
@kjbracey
Copy link
Contributor Author

I think this should target 5.14, as it does force an update of MDK for people doing export. For 5.13, they get away with the fact it falls back to gnu++11, as the 5.13 codebase has no C++14 constructs.

@kjbracey
Copy link
Contributor Author

(Note I made sure to use µ everywhere rather than u, including the branch name, just to see if I could break anything).

@ciarmcom ciarmcom requested review from a team August 14, 2019 15:00
@ciarmcom
Copy link
Member

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

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 19, 2019

Tagged for 5.14

I tested with 5.26 that I still have locally, errors: error: invalid value '' in '-std=' and lot of "Notes" printed: note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard. Definitely, this settings is not backward compatible and will need to be in release notes.

µVision export now requires MDK 5.28a or later

Can we expand here to explain due to the new standard this won't work in earlier versions and fixes the issue (a reason to update) ?

@kjbracey
Copy link
Contributor Author

Expanded the release notes - feel free to edit further.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 19, 2019

@ARMmbed/mbed-os-test This update (5.28 uvision) needs to happen in CI as well

@kjbracey
Copy link
Contributor Author

@ARMmbed/mbed-os-test This update (5.28 uvision) needs to happen in CI as well

Indeed, but this isn't a breaking change for CI, as it will be already broken due to the C++14 code on master.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 20, 2019

Just updating uvision in CI should make master green again for uvision exporters tests. We can progress here now anyway

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 20, 2019

@ARMmbed/mbed-os-tools Please review

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 23, 2019

This fix should land soon to fix uvision exporters nightly failures.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 26, 2019

@ARMmbed/mbed-os-tools Please review

Pending review 👀

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 29, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Aug 29, 2019

Test run: FAILED

Summary: 1 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-IAR

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 29, 2019

Build restarted

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 29, 2019

Note, we are close to the 5.14 code freeze. This needs update asap to be in 5.14 otherwise will move to the next minor version

@kjbracey-arm Let's poke tools team to get their review here

@mbed-ci
Copy link

mbed-ci commented Aug 29, 2019

Test run: FAILED

Summary: 2 of 4 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-IAR

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 29, 2019

CI restarted

@mbed-ci
Copy link

mbed-ci commented Aug 29, 2019

Test run: SUCCESS

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

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 29, 2019

@kjbracey-arm It's ready, shall this go to 5.14?

@ARMmbed/mbed-os-tools Please review

@kjbracey
Copy link
Contributor Author

kjbracey commented Aug 29, 2019

@kjbracey-arm It's ready, shall this go to 5.14?

I believe it has to, or you've no working µVision export.

@0xc0170 0xc0170 merged commit 159ee45 into ARMmbed:master Aug 29, 2019
kjbracey added a commit to kjbracey/mbed-os-5-docs that referenced this pull request Oct 25, 2019
kjbracey added a commit to kjbracey/mbed-os-5-docs that referenced this pull request Oct 25, 2019
kjbracey added a commit to kjbracey/mbed-os-5-docs that referenced this pull request Oct 25, 2019
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.

uVision compile after export broken
5 participants