Skip to content

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

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 32 commits into from
Mar 4, 2019
Merged

Conversation

SenRamakri
Copy link
Contributor

@SenRamakri SenRamakri 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
Copy link
Contributor Author

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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have an issue to track this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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"],
Copy link
Contributor Author

@SenRamakri SenRamakri Feb 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs tracking issue then

Copy link
Contributor Author

@SenRamakri SenRamakri Feb 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracking issue #9830

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 28, 2019

Functionality change

Needs release notes section addition

@cmonr
Copy link
Contributor

cmonr commented Feb 28, 2019

Needs release notes section additio

And a rebase

SenRamakri and others added 16 commits February 28, 2019 11:53
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.
@SenRamakri
Copy link
Contributor Author

@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
Copy link
Contributor

cmonr commented Mar 1, 2019

CI started

@ghost ghost added the PM_ACCEPTED label Mar 1, 2019
@SenRamakri
Copy link
Contributor Author

@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
Copy link
Contributor

cmonr commented Mar 1, 2019

@SenRamakri Correct.

Now that it's in, will retest.

@cmonr
Copy link
Contributor

cmonr commented Mar 1, 2019

CI started

@mbed-ci
Copy link

mbed-ci 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
Copy link
Contributor

cmonr 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
Copy link

mbed-ci commented Mar 2, 2019

Test run: SUCCESS

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

@SenRamakri
Copy link
Contributor Author

@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
Copy link
Contributor

cmonr 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
Copy link
Contributor Author

@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
Copy link
Contributor

0xc0170 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 mentioned this pull request Mar 4, 2019
@0xc0170 0xc0170 merged commit e75794e into master Mar 4, 2019
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 4, 2019

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

coisme pushed a commit to coisme/mbed-os-example-socket-stats that referenced this pull request Jun 11, 2019
In the Building section in README.md, Arm Compiler 5 is mentioned. However, ARM Compiler 6 is default from Mbed OS 5.12.
ARMmbed/mbed-os#9888
@adbridge adbridge deleted the feature-armc6 branch August 20, 2019 10:50
hugueskamba pushed a commit to ARMmbed/mbed-os-example-socket-stats that referenced this pull request Aug 29, 2019
In the Building section in README.md, Arm Compiler 5 is mentioned. However, ARM Compiler 6 is default from Mbed OS 5.12.
ARMmbed/mbed-os#9888
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.

9 participants