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

Correct some CPU selections in tools #10390

Merged
merged 3 commits into from Apr 26, 2019

Conversation

Projects
None yet
10 participants
@kjbracey-arm
Copy link
Contributor

commented Apr 12, 2019

Description

  • For ARMC6, core types Cortex-M4 and Cortex-M7 did not explicitly add --fpu=none, so it defaulted to assuming FPU present. This would cause a compilation error if the target's cmsis.h had __FPU_PRESENT defined to 0.

  • For GCC, Cortex-M33FE did not include +dsp in the architecture selection.

  • For ARMC5 and ARMC6, Cortex-M0+ did not pass M0plus to the non-Clang tools.

  • Add missing Cortex-M33E DSP Extension without FP possibility.

  • Switch KW24D to use ARMC6 - it was using ARMC5 because it has non-FP Cortex-M4 and hit this tool problem.

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
@kjbracey-arm

This comment has been minimized.

Copy link
Contributor Author

commented Apr 12, 2019

Target KW24D is currently marked to not work with ARMC6 - it's possible that this FPU selection problem is the only reason - it's the only real target with Cortex-M4 that doesn't have an FPU. All others actually do, and should have selected Cortex-M4F - other PRs are in to adjust those.

@ciarmcom ciarmcom requested review from ARMmbed/mbed-os-maintainers Apr 12, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Apr 12, 2019

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

@bridadan
Copy link
Contributor

left a comment

Nice catch! Looks good to me, probably should run this past @deepikabhavnani too.

@deepikabhavnani

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2019

No issue in explicitly setting fpu and dsp options, but it will be good to verify them and make sure all combinations are tested in CI, for some weird reasons I have seen fp is accepted and no_fp not with different compiler versions, don;t remember the exact combinations on top of my head but saw this weird behavior recently.

@0xc0170

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

Lets start first CI

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2019

We would have to add a bunch of dummy targets for the as-yet-unused CPU selections. I'm not sure if it's worth it - we would find any problems immediately when someone tries adding a new target.

(This one did pop up with someone adding a non-FP Cortex-M7 in a private repo).

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 15, 2019

Test run: FAILED

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

Failed test jobs:

  • jenkins-ci/mbed-os-ci_dynamic-memory-usage
  • jenkins-ci/mbed-os-ci_greentea-test
@alekla01

This comment has been minimized.

Copy link
Contributor

commented Apr 15, 2019

restarted jenkins-ci/mbed-os-ci_dynamic-memory-usage

@alekla01

This comment has been minimized.

Copy link
Contributor

commented Apr 15, 2019

restarted jenkins-ci/greentea-test

@SenRamakri

This comment has been minimized.

Copy link
Collaborator

commented Apr 16, 2019

@kjbracey-arm - I think "build-ARM" is failing with KW24D cause its still compiling with ARMC5. Please make a change to targets.json for KW24D to replace "ARMC5" entry with "ARM" in supported_toolchains.

@bridadan

This comment has been minimized.

Copy link
Contributor

commented Apr 16, 2019

KW24D failed to build with the following error: Fatal error: C3903U: Argument 'Cortex-M4.no_fp' not permitted for option 'cpu'. I think we probably just need to update the cpu flag with the correct combination of Cortex-M4 and "no fpu" option for ARMC5.

@SenRamakri we probably don't want to shift the KW24D to ARMC6 until the target has been verified to work with that right? Is this work already done?

@cmonr cmonr added needs: review and removed needs: CI labels Apr 16, 2019

@SenRamakri

This comment has been minimized.

Copy link
Collaborator

commented Apr 16, 2019

@bridadan - This is the change we need to have KW24D(Coretx-M4 targets) working with ARMC6. @studavekar has already verified this.

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 16, 2019

Test run: FAILED

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

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
@bridadan

This comment has been minimized.

Copy link
Contributor

commented Apr 16, 2019

Ah good to know! Thanks @SenRamakri

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Apr 16, 2019

[DEBUG] Output: Fatal error: C3903U: Argument 'Cortex-M4.no_fp' not permitted for option 'cpu'.
Traceback (most recent call last):
  File "/builds/ws/mbed-os-ci_build-ARM@2/mbed-os/tools/build.py", line 208, in main
    notify = notifier,
  File "/builds/ws/mbed-os-ci_build-ARM@2/mbed-os/tools/build_api.py", line 771, in build_library
    res, res.get_file_paths(FileType.INC_DIR))
  File "/builds/ws/mbed-os-ci_build-ARM@2/mbed-os/tools/toolchains/mbed_toolchain.py", line 457, in compile_sources
    return self.compile_queue(queue, objects)
  File "/builds/ws/mbed-os-ci_build-ARM@2/mbed-os/tools/toolchains/mbed_toolchain.py", line 530, in compile_queue
    raise ToolException(err)
ToolException: Fatal error: C3903U: Argument 'Cortex-M4.no_fp' not permitted for option 'cpu'.

@cmonr cmonr added needs: work and removed needs: review labels Apr 16, 2019

@kjbracey-arm kjbracey-arm force-pushed the kjbracey-arm:armc6_fpu_sel branch from 147787c to 0fa128d Apr 17, 2019

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor Author

commented Apr 17, 2019

Adjusted ARMC5 selections - I want to check that makes the KW24D work with ARMC5, then I'll switch it to use ARMC6.

@kjbracey-arm kjbracey-arm force-pushed the kjbracey-arm:armc6_fpu_sel branch from 0fa128d to 6d870ec Apr 17, 2019

@0xc0170 0xc0170 added needs: CI and removed needs: work labels Apr 17, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Apr 17, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 17, 2019

Test run: FAILED

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

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test
@alekla01

This comment has been minimized.

Copy link
Contributor

commented Apr 17, 2019

restarted jenkins-ci/greentea-test

kjbracey-arm added some commits Apr 12, 2019

Correct some CPU selections in tools
* For ARMC6, core types `Cortex-M4` and `Cortex-M7` did not explicitly
  add `--fpu=none`, so it defaulted to assuming FPU present. This would
  cause a compilation error if the target's cmsis.h had `__FPU_PRESENT`
  defined to 0.

* For GCC, `Cortex-M33FE` did not include `+dsp` in the architecture
  selection.

* For ARMC5 and ARMC6, `Cortex-M0+` did not pass `M0plus` to the
  non-Clang tools.
Tools: Add "Cortex-M33E" option
There was a gap in our pattern - we didn't offer M33 with DSP Extension
but no floating-point.
KW24D: Use default ARM compiler (ARMC6)
KW24D was set to ARMC5 because the ARMC6 tooling didn't correctly handle
Cortex-M4 without floating-point. Now fixed.

@kjbracey-arm kjbracey-arm force-pushed the kjbracey-arm:armc6_fpu_sel branch from 642b0a3 to 20ac1c9 Apr 23, 2019

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor Author

commented Apr 23, 2019

Cortex-M7F versus M7FD flags to ARMC6 linker+assembler had got muddled - hopefully fixed now.

@SenRamakri

This comment has been minimized.

Copy link
Collaborator

commented Apr 24, 2019

I started CI on this as it has been pending for more than a day.

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 25, 2019

Test run: FAILED

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

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@adbridge adbridge merged commit c0feb1a into ARMmbed:master Apr 26, 2019

26 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
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 Success
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 8583 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 8448B.
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

@kjbracey-arm kjbracey-arm deleted the kjbracey-arm:armc6_fpu_sel branch May 2, 2019

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.