Skip to content

Project Setup: Eclipse

JohnK1987 edited this page Feb 16, 2024 · 3 revisions

This page will show you how to take an existing Mbed CE project and develop it using the Eclipse IDE.

Setting up Eclipse

  1. If you don't have Eclipse, you'll need to install it per the instructions here. Open it, and go through the getting started wizard according to your preferences.
  2. Set up Toolchain & Upload Methods

Create new empty project

  1. Locate to Eclipse workspace and create there a new project according to New-Project-Setup-Guide
  2. In the project create a .bat file. For example build.bat and copy the content below into it.
     mkdir build
     cd build
     cmake .. -GNinja -DCMAKE_BUILD_TYPE=%1 -DMBED_TARGET=%2
     ninja
     cd ..
    
  3. Run Eclipse, choose the workspace and choose Create a new Embedded C/C++project
  4. Select Empty or Existing CMake Project
  5. Fill same project name of MbedCE project or select the folder and pres Finish (When you do not see all files of MbedCE project in the Eclipse project folder then just close and re-open the project).

Building

In top panel choose Run > External Tools > External Tools Configurations make new configuration.

  • fill a name of the configuration, it could be handy when you have multiple projects or targets (optional)
  • on Main card into the Location line place path to the .bat file
  • on Working Directory line set path of the project folder.
  • into Arguments window place one of build types (Develop, Debug, Release) and next to (separated by a comma) place your target name in correct format.
  • After correct configuration click on Apply and finaly Run button. It should look like this image

Flashing Code

// TODO

Debugging

// TODO