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

Improve error message for exports for OS2-only targets #9589

Merged
merged 1 commit into from Feb 4, 2019

Conversation

Projects
None yet
6 participants
@bridadan
Copy link
Contributor

bridadan commented Feb 1, 2019

Description

Addresses the issue raised in #8977.

If you try to export an Mbed OS 5 project (includes the rtos) for an OS2-only target, a "not supported" message is supposed to be printed in response to the command. This is currently what you get:

[mbed] Working path "/Users/user/Desktop/test/mbed-os-example-blinky" (program)
Scan: mbed-os-example-blinky
usage: project.py [-h] [-m MCU] [-i IDE] [-c] [-p PROGRAM] [-n PROGRAM] [-b]
                  [-L] [-S [{matrix,ides}]] [--update-packs] [-E]
                  [--build BUILD_DIR] [--source SOURCE_DIR] [-D MACROS]
                  [--profile PROFILE] [--app-config APP_CONFIG] [-z]
                  [--ignore IGNORE]
project.py: error: LPC11U68 not supported by mcuxpresso
[mbed] ERROR: "/Applications/MBEDCLI.app/Contents/Resources/miniconda/bin/python" returned error.
       Code: 2
       Path: "/Users/user/Desktop/test/mbed-os-example-blinky"
       Command: "/Applications/MBEDCLI.app/Contents/Resources/miniconda/bin/python -u /Users/user/Desktop/test/mbed-os-example-blinky/mbed-os/tools/project.py -i mcuxpresso -m LPC11U68 --source ."
       Tip: You could retry the last command with "-v" flag for verbose output

This PR changes the error message to something more relevant:

[mbed] Working path "C:\Users\bridan01\onedrive_arm\Documents\dev\mbed-os-example-blinky" (program)
Scan: mbed-os-example-blinky
[Not Supported] Target does not support mbed OS 5
[mbed] ERROR: "c:\python27\python.exe" returned error.
       Code: 1
       Path: "C:\Users\bridan01\onedrive_arm\Documents\dev\mbed-os-example-blinky"
       Command: "c:\python27\python.exe -u C:\Users\bridan01\onedrive_arm\Documents\dev\mbed-os-example-blinky\mbed-os\tools\project.py -i mcuxpresso -m LPC11U68 --source ."
       Tip: You could retry the last command with "-v" flag for verbose output
---

FYI @fluidblue

Pull request type

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

Reviewers

@bridadan bridadan requested review from theotherjimmy and naveenkaje Feb 1, 2019

@naveenkaje
Copy link
Contributor

naveenkaje left a comment

Looks good to me!

@cmonr

cmonr approved these changes Feb 2, 2019

@cmonr cmonr added the needs: review label Feb 2, 2019

@0xc0170

0xc0170 approved these changes Feb 4, 2019

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Feb 4, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

0xc0170 commented Feb 4, 2019

Waiting for @theotherjimmy approval, meanwhile running CI

@0xc0170

This comment has been minimized.

Copy link
Member

0xc0170 commented Feb 4, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

mbed-ci commented Feb 4, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 added needs: review and removed needs: CI labels Feb 4, 2019

@0xc0170 0xc0170 merged commit 1c483e8 into ARMmbed:master Feb 4, 2019

27 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-ARMC6 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 RTOS ROM(+0 bytes) RAM(+0 bytes)
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 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 10503 cycles (-20 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 (+0.00%)
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

@0xc0170 0xc0170 removed the ready for merge label Feb 4, 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.