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

ARM Toolchain update to ARM Compiler 6.11(ARMC6) #9888

Merged
merged 32 commits into from Mar 4, 2019

Conversation

Projects
None yet
@SenRamakri
Copy link
Collaborator

commented Feb 28, 2019

Description

This is the PR to merge feature-armc6 branch to master.
With this PR we will be switching to ARMC6 as the default compiler for most targets.
Note that some targets which are incompatible with ARMC6 will stay with ARMC5,
but this is temporary and we expect to move all targets to ARMC6 soon. The tools changes are in
place to use the right toolchains based on target toolchain support. Also see related
documentation PR(ARMmbed/mbed-os-5-docs#945) which captures
this.

Pull request type

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

Release notes

Mbed OS currently supports three compilers - GCC, IAR and ARM. Mbed OS 5.11 and previous versions support ARM Compiler 5 but this doesn't support the new ARM v8-M architecture
and has been superseded by ARM Compiler 6. ARMC6 is built on Clang and LLVM technology and enables support for ARMv8-M architecture. With Mbed-OS 5.12 release, ARMC6
will be the default ARM toolchain for all Mbed-OS targets. Although most of the source code will be backward compatible with ARMC5 it's highly encouraged that new/existing
Mbed-OS targets/developers use ARM Compiler 6 for further development.

For more info on ARM Compiler 6 please refer - https://developer.arm.com/products/software-development-tools/compilers/arm-compiler/documentation/

If you are a developer needing access to ARM Compiler 6, it's available at https://developer.arm.com/products/software-development-tools/compilers/arm-compiler/downloads/version-6.

@SenRamakri

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 28, 2019

@ARMmbed/mbed-os-maintainers - There is merge conflict with this PR. I'll be working on rebasing/resolving the conflicts.

@SenRamakri SenRamakri requested review from theotherjimmy, cmonr, ARMmbed/mbed-os-maintainers, 0xc0170 and bulislaw Feb 28, 2019

@@ -1325,7 +1325,7 @@
"KW24D": {
"supported_form_factors": ["ARDUINO"],
"core": "Cortex-M4",
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
"supported_toolchains": ["ARMC5", "GCC_ARM", "IAR"],

This comment has been minimized.

Copy link
@SenRamakri

SenRamakri Feb 28, 2019

Author Collaborator

We are seeing runtime failures with this target with ARMC6. This needs further investigation/partner support, so currently KW24D will stay with ARMC5.

This comment has been minimized.

Copy link
@bulislaw

bulislaw Feb 28, 2019

Member

Can we have an issue to track this?

This comment has been minimized.

Copy link
@SenRamakri

SenRamakri Feb 28, 2019

Author Collaborator

@0xc0170 - Please see ARM Internal Ref: IOTCORE-1059

@@ -7692,7 +7694,7 @@
"FVP_MPS2": {
"inherits": ["ARM_FM"],
"public": false,
"supported_toolchains": ["GCC_ARM", "ARM", "IAR"],
"supported_toolchains": ["GCC_ARM", "ARMC5", "IAR"],

This comment has been minimized.

Copy link
@SenRamakri

SenRamakri Feb 28, 2019

Author Collaborator

FVP targets are failing with ARMC6 compiler, it appears the code itself is ok but the compiler fails with internal error/fault.
At this point, we dont know whats causing this and may need escalation to Compiler team and while we explore that we are using ARMC5 for FVP target.

This comment has been minimized.

Copy link
@0xc0170

0xc0170 Feb 28, 2019

Member

This needs tracking issue then

This comment has been minimized.

Copy link
@SenRamakri

SenRamakri Feb 28, 2019

Author Collaborator

Yes, ARM Compiler team has been contacted. We will continue to follow up with them.

@@ -7878,7 +7880,7 @@
"inherits": ["Target"],
"macros": ["MBED_MPU_CUSTOM"],
"default_toolchain": "GCC_ARM",
"supported_toolchains": ["GCC_ARM", "IAR", "ARM"],

This comment has been minimized.

Copy link
@SenRamakri

SenRamakri Feb 28, 2019

Author Collaborator

All Cypress targets are failing ARMC6 compilation. This needs investigation from partners, so we are currently binding Cypress targets to ARMC5.

This comment has been minimized.

Copy link
@0xc0170

0xc0170 Feb 28, 2019

Member

Tracking issue #9830

@0xc0170 0xc0170 added the needs: work label Feb 28, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Feb 28, 2019

Functionality change

Needs release notes section addition

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Feb 28, 2019

Needs release notes section additio

And a rebase

SenRamakri and others added some commits Feb 4, 2019

RTX5: Make rtx_core_ca.h cope with compiler in Thumb mode
Assembler in rtx_core_ca.h is on the whole unified syntax such that it
should work fine if assembled as either ARM or Thumb-2.

The exception was __get_PSP, which uses STM^, which is only available
in ARM state.

Flagging for this function was incorrect, except for IAR - it switched
assembler state without telling the compiler, meaning that the resulting
assembler output could be incorrect, and that the function itself would
not be correctly marked as an ARM function - the CPU would enter in
Thumb state.

Alternative fix would be to switch to System mode, which would work
as either ARM or Thumb-2 assembler, like the rest of the file, but
this is the minimal change.

Fixes #526.

@0xc0170 0xc0170 removed the needs: review label Mar 1, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 1, 2019

@ARMmbed/mbed-os-test Please review ^^

@adbridge adbridge added the risk: A label Mar 1, 2019

@SenRamakri

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 1, 2019

@cmonr @ARMmbed/mbed-os-maintainers - Please restart CI on this. I have pushed 2 commits - One to fix the exporter issues, and other to fix the FVP_MPS2 targets failing ARMC6 builds, and the fix/workaround was recommended by compiler team.

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

CI started

@SenRamakri

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 1, 2019

@ARMmbed/mbed-os-maintainers -
Im seeing the error - UndefinedParameter: Attempt to override undefined parameter 'nsapi.socket-stats-enabled' in 'application[*]'

I think we need this PR to fix it - #9067 ?

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

@SenRamakri Correct.

Now that it's in, will retest.

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

CI started

@cmonr cmonr added needs: CI and removed needs: work labels Mar 1, 2019

@mbed-ci

This comment has been minimized.

Copy link

commented Mar 1, 2019

Test run: FAILED

Summary: 3 of 9 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARMC6
  • jenkins-ci/mbed-os-ci_build-IAR8
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

git checkout -b master 7c9a718
Commit message: "Merge pull request #9469 from kjbracey-arm/spi_muxing"

Found the problem. The job used a slightly older version of master.

Restarting CI.

No need. The above comment was from the second run. The third run with the updated master branch is still running.

@mbed-ci

This comment has been minimized.

Copy link

commented Mar 2, 2019

Test run: SUCCESS

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

@SenRamakri

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 2, 2019

@ARMmbed/mbed-os-maintainers - Looks like all tests are passing now on this PR. But note that if we merge this PR before #9908 then #9908 will need additional changes in targets.json. Or if we merge #9908 first, this PR will need additional changes.
If we are expecting more changes in #9908 irrespective of this, maybe its ok to merge this before #9908 and have that communicated through review comments for #9908 as the changes are small/easy.

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 2, 2019

@SenRamakri I think the original reason/plan as to why we wanted to hold off on merging this until Sunday was to limit the possible risk that bringing this PR in could have against other PRs that need CI.

The request has been fwd to other maintainers and PM.

@SenRamakri

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 2, 2019

@cmonr - I agree with your comment, but I just wanted to let maintainers know about the implications of merging sequence. The point is, one of these PRs will need additional changes depending on which goes first.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Mar 4, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 4, 2019

If we are expecting more changes in #9908 irrespective of this, maybe its ok to merge this before #9908 and have that communicated through review comments for #9908 as the changes are small/easy.

Status for today, 9908 still needs some changes, this should go in first.

Update: the PR is targeting rc2. this one is in rc1

@0xc0170 0xc0170 referenced this pull request Mar 4, 2019

Merged

Pr/cy mbed os 5.12.0 #9908

@0xc0170

0xc0170 approved these changes Mar 4, 2019

@0xc0170 0xc0170 merged commit e75794e into master Mar 4, 2019

29 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
jenkins-ci/build-ARMC5 Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR8 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-ARMC5 Success
Details
jenkins-ci/mbed2-build-ARMC6 Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR8 Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 10342 cycles (+1011 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details

@0xc0170 0xc0170 removed the ready for merge label Mar 4, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 4, 2019

@SenRamakri I scheduled nightly job now, will check the progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.