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

Tools: Don't traceback on missing linker script #8250

Merged
merged 2 commits into from Oct 22, 2018

Conversation

Projects
None yet
7 participants
@theotherjimmy
Contributor

theotherjimmy commented Sep 25, 2018

Description

The mbed compile would traceback when no linker script is found.
This PR changes that behavior to make that into a NotSupportedException,
which has decent user behavior.

Fixes #7723

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change
Tools: Don't traceback on missing linker script
### Description

The `mbed compile` would traceback when no linker script is found.
This PR changes that behavior to make that into a NotSupportedException,
which has decent user behavior.

Fixes #7723

### Pull request type

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

@cmonr cmonr requested review from bridadan and cmonr Sep 26, 2018

@cmonr cmonr added the needs: review label Sep 26, 2018

@bridadan

Looks good 👍

@cmonr cmonr added needs: CI and removed needs: review labels Sep 26, 2018

@cmonr

cmonr approved these changes Sep 26, 2018

@@ -532,6 +532,8 @@ def build_project(src_paths, build_path, target, toolchain_name,
# Change linker script if specified
if linker_script is not None:
resources.add_file_ref(linker_script, linker_script)
if not resources.get_file_refs(FileType.LD_SCRIPT):
raise NotSupportedException("No Linker Script found!")

This comment has been minimized.

@yennster

yennster Oct 10, 2018

Contributor

I would change this exception to match the one in __init__.py: "No linker script found"

@cmonr cmonr added needs: work and removed needs: CI labels Oct 13, 2018

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Oct 19, 2018

I'll remove the !. Just a moment.

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Oct 19, 2018

@yennster Done. Please re-review.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 21, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 21, 2018

Build : SUCCESS

Build number : 3412
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8250/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr cmonr merged commit 46d717c into ARMmbed:master Oct 22, 2018

13 checks passed

ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed , RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 672 files (+0 files)
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 10260 cycles (+523 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8372B
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@cmonr cmonr removed the ready for merge label Oct 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment