You are viewing an older revision! See the latest version

Exporting to Eclipse IDEs

Support

Please note, changing the compiler toolchain introduces many degrees of freedom in the system; these differences include the translation of C/C++ code to assembly code, the link time optimizations, differences because of the implementations of the C standard libraries, and differences based on compile and link options. It also makes it a lot harder to share code and questions with other developers, as the context needs to be shared too!

Whilst we support exporting your project and the libraries to an alternate toolchain, we cannot guarantee the same consistency as using the mbed Online Compiler. We will do our best to maintain the exported libraries, project file and makefiles, but please understand we can not cover all cases, combinations or provide support for use of these alternate tools themselves!

Eclipse is a widely-used, open source IDE that supports multiple languages. It is used by many offline toolchains, including LPCXpresso and Kinetis Design Studio. The setup process for each IDE will vary depending on the distribution; however, the user interface between these distributions will not change much, so these instructions should be easy to apply to all Eclipse-based IDEs.

For a complete overview of the "export" feature, please refer to our general: Exporting to offline toolchains.

To export your mbed program for use in an Eclipse-based IDE, right-click the program in your program workspace. From the dialog, you can select your desired toolchain for the "Export Toolchain" field. Also, be sure to select the correct target platform under the "Export Target" field.

/media/uploads/bridadan/mbed_exporting_online_ide.png

When you choose export, a zip file containing all the files you need for will be generated. Unzip it anywhere. Open your Eclipse-based IDE.

NOTE: All of the following screenshots will be using a plain Eclipse IDE installation with no embedded development plugins installed. This was done to keep these instructions as general as possible. Your IDE's user interface will most likely not match the following screenshots exactly, but it should be very similar.

Click File > Import…

/media/uploads/bridadan/eclipse_import.png

In the dialog that pops up, under “General”, select “Existing Projects into Workspace” and click Next.

/media/uploads/bridadan/eclipse_import_dialog.png

Next to the “Select root directory” field, click Browse. In the dialog that pops up, navigate to where you unzipped the downloaded program and select the folder. Hit “OK”.

/media/uploads/bridadan/eclipse_import_dialog_2.png

In the “Projects” area, you should see the project name listed. Ensure the checkbox next to it is checked. Hit “Finish”.

/media/uploads/bridadan/eclipse_import_dialog_3.png

In the Project Explorer, expand the project and double click the main.cpp. Ensure the code looks right.

Click the arrow next to the hammer in the toolbar and select Debug.

Click the hammer button now. You should get a “Build Finished” message in the Console box. Sometimes this part gave me trouble and I had to click the hammer a few times. 12) Click the lightning bolt in the toolbar. In the dialog that pops up, under GDB OpenOCD Debugging, select your project. 13) Click the Search Project button and select the “Debug” option under theI Qualifier field. For example, for mbed_blinky this was listed as “armlet - /mbed_blinky/Debug/mbed_blinky.elf”. Hit OK. 14) Click Apply, then click Flash. 15) The flashing process should start. The green LED on the K64F will flash for a while. When it stops, hit the reset button to run your program.


All wikipages