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 check for the ARM toolchain binary in the PATH. #10044

Merged
merged 1 commit into from Mar 14, 2019

Conversation

Projects
None yet
8 participants
@bridadan
Copy link
Contributor

commented Mar 12, 2019

Description

Fixes #10039

The compiler used for the ARM toolchain changes depending on the target.
This changes the front end scripts to do the proper toolchain look up
before checking the system PATH for the compiler executable. The tools
were always checking for the ARMC5 compiler, now it should check for the
right version.

FYI @SenRamakri

Pull request type

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

Reviewers

Release Notes

Correct check for the ARM toolchain binary in the PATH.
The compiler used for the ARM toolchain changes depending on the target.
This changes the front end scripts to do the proper toolchain look up
before checking the system PATH for the compiler executable. The tools
were always checking for the ARMC5 compiler, now it should check for the
right version.

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

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Mar 12, 2019

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

@ciarmcom ciarmcom requested a review from ARMmbed/mbed-os-tools Mar 12, 2019

@theotherjimmy
Copy link
Contributor

left a comment

Looks fine.

@SenRamakri

This comment has been minimized.

Copy link
Collaborator

commented Mar 13, 2019

@ChiefBureaucraticOfficer - Can we make this change go in for 5.12.rc3? Currently this is marked for 5.12.1.
This actually fixes the issue where the ARMC6 compilation fails without proper message when ARMC6 is not available/configured.

Tagging @ARMmbed/mbed-os-maintainers @0xc0170 @cmonr @screamerbg

@bridadan

This comment has been minimized.

Copy link
Contributor Author

commented Mar 13, 2019

What we currently print:

mbed compile -t ARM -m UBLOX_C030_U201
[mbed] WARNING: If you're using Python 3 with Mbed OS 5.8 and earlier versions, Python errors will occur when compiling, testing and exporting
---
[mbed] Working path "C:\Users\bridan01\onedrive_arm\Documents\dev\mbed-os" (program)
[OS ERROR] Command: armclang --vsn
[ERROR] [WinError 2] The system cannot find the file specified
[mbed] ERROR: "C:\Users\bridan01\AppData\Local\Programs\Python\Python36-32\python.exe" returned error.
       Code: 1
       Path: "C:\Users\bridan01\onedrive_arm\Documents\dev\mbed-os"
       Command: "C:\Users\bridan01\AppData\Local\Programs\Python\Python36-32\python.exe -u C:\Users\bridan01\onedrive_arm\Documents\dev\mbed-os\tools\make.py -t ARM -m UBLOX_C030_U201 --source . --build .\BUILD\UBLOX_C030_U201\ARM"
       Tip: You could retry the last command with "-v" flag for verbose output
---
[mbed] WARNING: Using Python 3 with Mbed OS 5.8 and earlier can cause errors with compiling, testing and exporting
---

What will be printed after this change:

mbed compile -t ARM -m UBLOX_C030_U201
[mbed] WARNING: If you're using Python 3 with Mbed OS 5.8 and earlier versions, Python errors will occur when compiling, testing and exporting
---
[mbed] Working path "C:\Users\bridan01\onedrive_arm\Documents\dev\mbed-os" (program)
usage: make.py [-h] [-m MCU] [--custom-targets CUSTOM_TARGETS_DIRECTORY]
               [-t TOOLCHAIN] [--color] [--cflags CFLAGS]
               [--asmflags ASMFLAGS] [--ldflags LDFLAGS] [-c]
               [--profile PROFILE] [--app-config APP_CONFIG]
               [-p PROGRAM | -n PROGRAM | -L | -S [{matrix,toolchains,targets}]]
               [-j JOBS] [-v] [--silent] [-D MACROS] [-f GENERAL_FILTER_REGEX]
               [--stats-depth STATS_DEPTH] [--automated] [--host HOST_TEST]
               [--extra EXTRA] [--peripherals PERIPHERALS]
               [--dep DEPENDENCIES] [--source SOURCE_DIR]
               [--duration DURATION] [--build BUILD_DIR] [-N ARTIFACT_NAME]
               [--ignore IGNORE] [-b BAUD] [--rpc] [--usb] [--dsp] [--testlib]
               [--build-data BUILD_DATA] [-l LINKER_SCRIPT]
make.py: error: Could not find executable for ARMC6.
Currently set search path: No path set
[mbed] ERROR: "C:\Users\bridan01\AppData\Local\Programs\Python\Python36-32\python.exe" returned error.
       Code: 2
       Path: "C:\Users\bridan01\onedrive_arm\Documents\dev\mbed-os"
       Command: "C:\Users\bridan01\AppData\Local\Programs\Python\Python36-32\python.exe -u C:\Users\bridan01\onedrive_arm\Documents\dev\mbed-os\tools\make.py -t ARM -m UBLOX_C030_U201 --source . --build .\BUILD\UBLOX_C030_U201\ARM"
       Tip: You could retry the last command with "-v" flag for verbose output
---
[mbed] WARNING: Using Python 3 with Mbed OS 5.8 and earlier can cause errors with compiling, testing and exporting
---

This is consistent with our other toolchains if the path to the compiler executable is not properly configured (or found in the system PATH).

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 13, 2019

CI started

@screamerbg

This comment has been minimized.

Copy link
Contributor

commented Mar 13, 2019

@bridadan It's confusing that when armcc is not found, I get help from make.py. with different command options than mbed complie.

@theotherjimmy

This comment has been minimized.

Copy link
Contributor

commented Mar 13, 2019

@screamerbg I think that's out of scope for this PR. Do we have an issue for that in this issue tracker?

@bridadan

This comment has been minimized.

Copy link
Contributor Author

commented Mar 13, 2019

@screamerbg I agree with you, I've created an issue here to track it: #10090

The fix should be pretty small, just need to double check how it affects the other front-end scripts (build.py, make.py, etc)

@mbed-ci

This comment has been minimized.

Copy link

commented Mar 13, 2019

Test run: FAILED

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

Failed test jobs:

  • jenkins-ci/mbed-os-ci_exporter
@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 13, 2019

Going to restart the exporter job again.

We might be having license issues with ARMc6.

@cmonr cmonr added ready for merge and removed needs: CI labels Mar 14, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 14, 2019

@SenRamakri Thanks for the info!

@0xc0170 0xc0170 merged commit 79c7fc8 into ARMmbed:master Mar 14, 2019

28 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-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 9268 cycles (-1039 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
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
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.