Skip to content

Fallback to ARMC5 when ARMC6 is not configured #10193

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 11 commits into from
Mar 24, 2019

Conversation

bridadan
Copy link
Contributor

@bridadan bridadan commented Mar 22, 2019

Description

This PR makes it so:

  • if -t ARM is being supplied as the toolchain
  • and if ARMC6 is not configured in the user's environment
  • and ARMC5 is configured
  • and the the target supports building with both ARMC5 and ARMC6
    Then the tools will select ARMC5 as the toolchain for building. Previously, this was always set to ARMC6 (with a few targets being the exception).

If the tools fallback to ARMC5, the following warning will be printed at the bottom of the log:

------------------------------------------------------------
Warning: We noticed that you are using Arm Compiler 5. We are deprecating the use of Arm Compiler 5 soon. Please upgrade your environment to Arm Compiler 6 which is free to use with Mbed OS. For more information, please visit https://os.mbed.com/docs/mbed-os/latest/tools/index.html
------------------------------------------------------------

This feature has been documented here (thanks @SenRamakri): ARMmbed/mbed-os-5-docs#1024

Normally I'd write out all the implications of the changes in this PR, however the implementation details are fairly extensive. Reading the docs above is a good place to start, probably followed by the commit history.

FYI @screamerbg

TODO

  • The ARMC5 warning needs to be updated with a link to the proper doc.
  • I would really prefer to bring this in with a unit test. The implementation is quite complex and the details can easily be lost if verifying manually. Most likely this will have to come in in a later release due to time constraints.

Pull request type

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

Reviewers

@SenRamakri @theotherjimmy @bulislaw

Release Notes

The -t ARM argument defaults to using the Arm Compiler 6 when it is configured in a user's enviroment. However, In cases where a target supports building with both Arm Compiler 5 and Arm Compiler 6 and Arm Compiler 6 is not properly configured, the tools will fallback to compiling with Arm Compiler 5.

@ciarmcom ciarmcom requested review from bulislaw, SenRamakri, theotherjimmy and a team March 22, 2019 06:00
@ciarmcom
Copy link
Member

@bridadan, thank you for your changes.
@SenRamakri @theotherjimmy @bulislaw @ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-tools please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 22, 2019

Started CI to get early test run

@mbed-ci
Copy link

mbed-ci commented Mar 22, 2019

Test run: FAILED

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

Failed test jobs:

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

@mbed-ci
Copy link

mbed-ci commented Mar 22, 2019

Test run: FAILED

Summary: 2 of 9 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-IAR8

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 22, 2019

Looks like this has affect on one target and its unsupported toolchains (build failures)

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 22, 2019

Setting to rc4

cc @adbridge @bulislaw

Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

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

Looks good. Please remember to add a link to docs to the warning.

@bridadan
Copy link
Contributor Author

@0xc0170 The PR is failing because the CI is attempting to build the examples for the NUMAKER_PFM_M2351 target using IAR and GCC_ARM, both of which the target does not support (and that is the error we get in CI: "Could not compile for NUMAKER_PFM_M2351: Target NUMAKER_PFM_M2351 is not supported by toolchain IAR").

In my opinion there are two fixes for this:

  1. Change CI so it doesn't attempt the build in the first place
  2. Change the example builder script its invoking so it double checks supported toolchains and does not raise an error

I'd prefer to go with choice 1. Any thoughts @OPpuolitaival?

@bridadan bridadan marked this pull request as ready for review March 22, 2019 12:59
@bridadan
Copy link
Contributor Author

Thanks to @OPpuolitaival, I believe the last commit will fix the CI failure.

@adbridge
Copy link
Contributor

ci started

Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

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

Looks good (here's a 🍩 token that can be redeemed next time I'm around. Don't loose it though there's no replacement policy!)

@bridadan bridadan force-pushed the arm_tc_with_fallback branch from 6f96d01 to bbcc25c Compare March 22, 2019 16:17
@bridadan
Copy link
Contributor Author

I'm looking into the exporter issue. Since it failed on #10131 as well I doubt my changes caused this issue.

@bridadan
Copy link
Contributor Author

The exporter issue is unrelated to this change, however I've pushed a fix (hopefully) for it here: #10199

@mbed-ci
Copy link

mbed-ci commented Mar 22, 2019

Test run: FAILED

Summary: 1 of 13 test jobs failed
Build number : 3
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_exporter

@mbed-ci
Copy link

mbed-ci commented Mar 22, 2019

Test run: FAILED

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

Failed test jobs:

  • jenkins-ci/mbed-os-ci_exporter

Copy link
Contributor

@SenRamakri SenRamakri left a comment

Choose a reason for hiding this comment

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

Changes looks good to me, although uvision6 exporter seems to be failing.

@adbridge
Copy link
Contributor

@bridadan could you resolve the conflict please, this is the last PR needing to get through ci now ?

bridadan added 11 commits March 23, 2019 18:24
The affected targets are Renesas targets, USI_WM_BN_BM_22 based
targets, and the MTB_MXCHIP_EMW3166.
These functions will be used to handle some of the error state and
warning messages produced when the scripts attempt to select a valid
toolchain.
There are two new functions: get_valid_toolchain_names and
find_valid_toolchain. These functions are used to figure out if a
fallback is possible and necessary. find_valid_toolchain is expected to
be used by the front-end scripts.

get_toolchain_name was updated with some different logic and comments.
Some unused imports were removed as well as some general clean up.
This removes the arugment help from the output, making the error much
easier to find. This solves ARMmbed#10090.
@bridadan bridadan force-pushed the arm_tc_with_fallback branch from bbcc25c to b95732a Compare March 23, 2019 23:27
@bridadan
Copy link
Contributor Author

Rebased!

@adbridge
Copy link
Contributor

ci started

@mbed-ci
Copy link

mbed-ci commented Mar 24, 2019

Test run: FAILED

Summary: 1 of 13 test jobs failed
Build number : 5
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_exporter

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 24, 2019

exporters restarted, license server error

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.

10 participants