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 when exporting for make without a linker script #3483

Merged
merged 1 commit into from Dec 30, 2016

Conversation

theotherjimmy
Copy link
Contributor

Description

The error message is a bit better.

Status

READY

Todos

  • Manual test that not having a linker script causes this error

Sample output

Before

Scan: basic
Scan: env
Scan: hal
Traceback (most recent call last):
  File "project.py", line 244, in <module>
    main()
  File "project.py", line 240, in main
    zip_proj=zip_proj, build_profile=profile)
  File "project.py", line 93, in export
    build_profile=build_profile, silent=silent)
  File "D:\mbed-os-mbed-os-5.2\tools\project_api.py", line 229, in export_project
    macros=macros)
  File "D:\mbed-os-mbed-os-5.2\tools\project_api.py", line 90, in generate_project_files
    exporter.generate()
  File "D:\mbed-os-mbed-os-5.2\tools\export\cdt\__init__.py", line 14, in generate
    super(Eclipse, self).generate()
  File "D:\mbed-os-mbed-os-5.2\tools\export\makefile\__init__.py", line 82, in generate
    ctx[key] = ctx['vpath'][0] + "/" + ctx[key]
TypeError: cannot concatenate 'str' and 'NoneType' objects

After

Scan: basic
Scan: env
Scan: hal
Traceback (most recent call last):
  File "tools/project.py", line 248, in <module>
    main()
  File "tools/project.py", line 244, in main
    zip_proj=zip_proj, build_profile=profile)
  File "tools/project.py", line 94, in export
    build_profile=build_profile, silent=silent)
  File "/home/jimbri01/src/mbedmicro/mbed/tools/project_api.py", line 228, in export_project
    macros=macros)
  File "/home/jimbri01/src/mbedmicro/mbed/tools/project_api.py", line 89, in generate_project_files
    exporter.generate()
  File "/home/jimbri01/src/mbedmicro/mbed/tools/export/makefile/__init__.py", line 44, in generate
    raise NotSupportedException("No linker script found.")
tools.utils.NotSupportedException: No linker script found.

Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

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

Thanks for the before and after logs, LGTM

@bridadan
Copy link
Contributor

/morph export-build

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph export-build

Output

mbed Build Number: 67

All exports and builds passed!

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 28, 2016

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1334

All builds and test passed!

@0xc0170 0xc0170 merged commit 24cd573 into ARMmbed:master Dec 30, 2016
@rtsysir
Copy link

rtsysir commented Mar 18, 2017

why this error raise?
i build project and now can not export to gcc-arm
my gcc is 4.9

@theotherjimmy
Copy link
Contributor Author

@rtsysir You should open a new issue for your problem and track it's progress there. Further, I would need more context to help you examine what is going wrong with your export. For example, I would need to know what your project is structured like, what version of mbed-os and mbed-cli you are using, etc. The issue template should help guide you to providing the details needed for us to help.

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.

None yet

5 participants