You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Installation:

There are a few Eclipse and CSS configurations available on SLAC file systems.

Feel free to use the Eclipse CDT C/C++ Development Tool at /afs/slac/u/re/gwbrown/afsbin/eclipse/eclipse

How it got there:

Download from http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/junosr1
Unzip
run ./eclipse

An older version with different plugins is at:

/afs/slac/package/eclipse/i386_linux26/3.7.2/eclipse

[list more that are around]

New workspace:

When you start Eclipse, it asks for a workspace. A workspace is just a directory. Give it a directory name, and it will create it if it isn't there already

Editor colorization:

For reasonable colorization, I associate most EPICS files with the makefile editor
To transfer file associations, copy
oldWorkspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.runtime.prefs
into newWorkspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/

Other settings can be transferred similarly, but copying the entire .metadata directory tree will cause problems
Or
Go to Window -> Preferences, expand General->Content Types, expand Text -> Makefile, click Add...
and add everything in configure directory, *.db, *.substitutions, *.template, st.cmd

CVS:

To copy CVS and C/C++ preferences, in old workspace go to File->Export, in dialog select General->Preferences, create the preferences file
In new workspace, go to File->Import, in dialog select General->Preferences, select the file from old workspace
Or
Go to Window -> Open Perspective -> Other..., select CVS Repository Exploring. Under the CVS Repositories tab, right
click -> New -> Repository Location
Host: mcclogin
Repository Path: /afs/slac/g/lcls/cvs
User: yourusername
Connection type: ext

Browse directory tree to the code you want, right click -> Check Out
Saves resources  and some headaches if it's not configured as a C/C++ project, but limits features.
Making it a C/C++ project gives you: building in Eclipse, smart code editing features, debugging

Converting to C/C++ project:

Note: converting base or a directory containing many IOCs or modules to a C/C++ project can bog down your system. It's best to be more selective.

Click project name, right click -> New -> Convert to a C/C++ Project
Select Project type "Makefile project", then Toolchains Cross GCC and Linux GCC. Click "Finish".
Correct the make settings for EPICS by right clicking the project name -> Properties.
Click C/C++ Build. Make sure "Generate Makefiles automatically" is unchecked, and Build directory doesn't have any
path past your project name.
On the Behaviour tab, delete "all" after "Build (Incremental build)", and change "clean" to "distclean".
If you want Eclipse to know about base, modules, other things, expand C/C++ General, select Paths and Symbols, and
Add... include paths.

Building the IOC:

Click the hammer icon to run "make"
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.

  • No labels