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

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

Merged
merged 1 commit into from Aug 29, 2019

Conversation

@kjbracey-arm
Copy link
Contributor

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 #11217, as long as users update µVision too.
@kjbracey-arm

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2019

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-arm

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2019

(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 ARMmbed/mbed-os-maintainers Aug 14, 2019
@ciarmcom

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

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

@0xc0170

This comment has been minimized.

Copy link
Member

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-arm

This comment has been minimized.

Copy link
Contributor Author

commented Aug 19, 2019

Expanded the release notes - feel free to edit further.

@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 19, 2019

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

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor Author

commented Aug 19, 2019

@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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

commented Aug 20, 2019

@ARMmbed/mbed-os-tools Please review

@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 23, 2019

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

@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 26, 2019

@ARMmbed/mbed-os-tools Please review

Pending review 👀

@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 29, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member

commented Aug 29, 2019

Build restarted

@0xc0170

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member

commented Aug 29, 2019

CI restarted

@mbed-ci

This comment has been minimized.

Copy link

commented Aug 29, 2019

Test run: SUCCESS

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

@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 29, 2019

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

@ARMmbed/mbed-os-tools Please review

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor Author

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
25 checks passed
25 checks passed
continuous-integration/jenkins/pr-head This commit looks good
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8670 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8464B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.