Skip to content

Correct check for the ARM toolchain binary in the PATH. #10044

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 1 commit into from
Mar 14, 2019

Conversation

bridadan
Copy link
Contributor

@bridadan bridadan 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

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 a team March 12, 2019 02:00
@ciarmcom
Copy link
Member

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

@ciarmcom ciarmcom requested a review from a team March 12, 2019 02:00
Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

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

Looks fine.

@SenRamakri SenRamakri requested a review from a user March 13, 2019 19:34
@SenRamakri
Copy link
Contributor

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

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

cmonr commented Mar 13, 2019

CI started

@screamerbg
Copy link
Contributor

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

@theotherjimmy
Copy link
Contributor

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

@bridadan
Copy link
Contributor Author

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

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

cmonr commented Mar 13, 2019

Going to restart the exporter job again.

We might be having license issues with ARMc6.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 14, 2019

@SenRamakri Thanks for the info!

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.

8 participants