ESESC and Eclipse

From Vlsiwiki
Jump to: navigation, search

Eclipse is a flexible IDE that provides useful features such as code-indexing and integrated debugging that can help facilitate development work with the eSESC code base. This wiki provides tips for using eSESC with Eclipse.

Prerequisites

  • Install Eclipse on the target machine. This is usually accomplished through the use of a package manager such as yum for Red Hat based distros or apt for Debian based distros.
  • Checkout eSESC from the git repo. See instructions on the eSESC sample use page.

Create project with CMake

CMake is able to generate all of the files needed for a complete Eclipse project. The following steps describe how to do this. Note that these steps assume esesc has been checked out to ~/projs/esesc and that the Eclipse project directory is ~/workspace. These steps only describe how to compile a debug build, but compiling the release build only requires changing the build type variable.

mkdir ~/workspace/esesc-debug
cd ~/workspace/esesc-debug
cmake -DCMAKE_BUILD_TYPE=Debug -G "Eclipse CDT4 - Unix Makefiles" ~/projs/esesc

Import project into Eclipse

To import the project into Eclipse execute the following steps in Eclipse:

  • File -> Import
  • General -> Existing Projects into Workspace
  • Browse to the project directory (i.e. ~/workspace/esesc-debug)
  • Select the esesc project and then click finish

Notes and tips about using Eclipse with eSESC

  • In Eclipse the CMake project structure is replicated as a set of directory links. For example in the file listing in Eclipse the directory libsuc is accessed from the link suc.
  • If the cmake file structure changes it might be necessary to regenerate the Eclipse project, but this should be a rare occurrence.
  • Recommend copying the esesc.conf file to ~/workspace/esesc-debug/ and configuring it for the desired values for testing.
  • Updates to the repo should still be done by running git commands in a console window. The Eclipse git plugin is still in early alpha development stages and not recommended for use yet.
  • The advantage of having Eclipse development in a separate directory is it separates source code changes from object files and Eclipse metadata files.
  • QEMU still needs to be configured and compiled separately in the esesc source directory as described in the eSESC sample use page. Its build process is not integrated with CMake and thus not with Eclipse either.
  • In Eclipse the GNU [built in] code style is the closest to the coding standards for eSESC.