Skip to content

[Exporters] Add support for Eclipse Export #2833

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 4 commits into from
Sep 30, 2016
Merged

Conversation

sarahmarshy
Copy link
Contributor

@sarahmarshy sarahmarshy commented Sep 27, 2016

Description

Adds support for Eclipse exporting. The exported project supports building with polymorphic makefiles (IAR, GCC, and ARMc5) and debugging with pyocd. The export comes with .cproject and .project eclipse files, a py_ocd run/debug launch file, and a pyocd eclipse plugin quick install p2f file.

Status

READY

Related PRs

#2577

Steps to test or reproduce

To export and build:

  1. Either of the following:
    mbed export -m whatever -i eclipse_gcc_arm
    mbed export -m whatever -i eclipse_armc5
    mbed export -m whatever -i eclipse_iar
  2. Open Eclipse
  3. File>Import>General>Existing Project into Workspace>Next
  4. Browse>Select the root directory of exported project
  5. Right click the project in the explorer>Build Project

To Run (cannot run with armc5 built binary):

  1. Install Pyocd Eclipse plugin if you do not have it.
    A. File>Import>Install>Install Software Items From File>Next
    B. Browse>Root/of/your/project/eclipse-extras/necessary_software.p2f
  2. Pip install pyocd if you don't have it.
  3. Run>Run Configurations
  4. Expand GDB PyOCD Debugging and select the generated configuration in the form of targetname_py_ocd_settings.
  5. Select Debugger tab
  6. Select Variables next to Executable textbox
  7. Select Edit Variables....
  8. Select pyocd_path and "Edit..."
  9. Change its value to that of your Python Scripts directory (mine is C:\Python27\Scripts)
    A. This assumes that you have pyocd installed and pyocd-gdbserver.exe is in this folder as a result
  10. Run!

To Debug:

Follow all Run steps but substitute 'Debug Configurations' for 'Run Configurations' in step 3. The pyocd_path variable value will persist if you have followed these steps for running. If you wish to debug with an armc5 generated binary, you will need to flash the board yourself, then you can debug. The debugger will not try to load the executable before debugging if it is an armc5 project.

@sg- @theotherjimmy @screamerbg

@sarahmarshy sarahmarshy changed the title Eclipse ref [Exporters] Add support for Eclipse Export Sep 27, 2016
Copy link
Contributor

@sg- sg- left a comment

Choose a reason for hiding this comment

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

py_ocd_settings.tmpl should be pyocd_settings.tmpl

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

LGTM, once pyocd names are corrected

@screamerbg
Copy link
Contributor

@sarahmarshy Awesome! LGTM

@sg- sg- merged commit 64d9665 into ARMmbed:master Sep 30, 2016
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.

5 participants