Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Eclipse CDT (C/C++ Development Tool) is well suited to IOC development, and easily customized for editing .db/.template/.substitutions files. Even if you never touch the C code, you can do most of your IOC development with this tool. It includes more generally useful features like search and replace in a directory tree for file names or contents (Ctrl-H), regex search/replace, CVS access, make, gdb with local and remote targets, and launching external tools like edm and vdct. Feel free to try the installation at /afs/slac/u/re/gwbrown/afsbin/eclipse/eclipse. This is not maintained as a site installation. It's easy to download and install your own configuration, where you can try out plugins etc. and untar a clean uninstall if it causes problems. Make sure you've requested a big afs quota.

Table of Contents

Anchor
Download and Install Eclipse CDT
Download and Install Eclipse CDT

Download and Install Eclipse CDT

Download CDT from http://www.eclipse.org/downloads (one of many flavors of eclipse from eclipse.org)
Unzip/ tar -xvf filename
run ./eclipse in the directory created by unzippingin the directory you want to run it from, e.g. ~/bin/
"cd eclipse" (to get to the newly created installation) and run "./eclipse".

EPICS friendly C/C++

...

build settings

If you're mostly using this workspace for EPICS work, you can change global default settings by going to Window -> Preferences -> C/C++ -> New C/C++ Project Wizard -> Makefile Project. On the Behaviour tab, delete "all" after "Build (Incremental build)", and change "clean" to "distclean".

...

Eclipse has lots of project wizards and other ways of creating a new project. Here are the ones that are most often useful in IOC development:

Use a directory created outside Eclipse (e.g. with eco or git):

A directory where you can run "make" can be brought into Eclipse as a project. You can create a subdirectory of the workspace directory, and run makeBaseApp.pl there, use eco, use something you already have outside the workspace directory, copy or check out a directory... The important thing is the you start with a directory where you can run "make" (e.g. top of IOC or module).

...


Click the project name, right click -> Clean Project to run "make distclean"
Check the console tab for errors. The "Problems" tab isn't very reliable.

Anchor
Debugging the IOC
Debugging the IOC

Debugging the IOC:

General documentation is at http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_o_run.htm&cp=10_3_5 and http://wiki.eclipse.org/CDT/User/FAQ

For RTEMS specific steps, see this subpage.

A similar page for remote debugging LinuxRT targets is in the works. Some key points:

Where your app is started on the target, command line or startup script, start it with gdbserver. For example, the script could contain the line "/usr/bin/gdbserver :10000 ./bin/evrLab iocStartup.cmd".

When setting up the debug configuration in Eclipse, use the gdb corresponding to the compiler. For example, if your LinuxRT app gets compiled with

/afs/slac/package/linuxRT/buildroot-2014.08/host/linux-x86/usr/bin/i686-linux-g++

then you want to select for your gdb

/afs/slac/package/linuxRT/buildroot-2014.08/host/linux-x86/usr/bin/i686-linux-gdb

 

Anchor
Other Installations at SLAC
Other Installations at SLAC

...