Eclipse tutorial for CSE465

Garrett Eardley

Start up:

  1. Open Eclipse
  2. Specify Workspace that does not have "spaces" in the path

Creating new Project:

  1. Click file->new Project
  2. Find managed make C and click next
  3. Type in a project name and click next
  4. Specify Project Type: Executable (sparc-elf toolchain, bare sparc-elf with minimal i/o)

Creating a source file:

  1. File -> new source file
  2. Specify the source file name. ***IMPORTANT*** you must put the correct file extension and the end of the file name.

Creating a header file:

  1. Same as creating a source file but you click on new header file instead

Configuring Project:

  1. Right click on the project folder and select properties
  2. Click on C/C++ BUILD
  3. Specify configuration: Debug
  4. Click apply

Configuring to run grmon:

  1. Click on run->external tools-> external tools ...
  2. Click on Default GRMON launch
  3. Change executable to "grmon-eval"
  4. Change working directory to your current workspace
  5. Click on browse workspace
  6. Click on your project and select the debug folder
  7. Click OK
  8. Change arguments to "-i -u -uart //./com2"
  9. Click apply
  10. Click close

Configuring debug tools:

  1. Click on run->debug...
  2. Double click on C/C++ Application running on TSIM2/GRMON
  3. Cick on your project name
  4. Specify the application to debug
  5. Click on search project
  6. Select the the executable that is in the debug folder
  7. Click on the Grmon tab
  8. Specify Default GRMON launch
  9. Click on the Debugger tab
  10. Specify the sparc-elf GDB Debugger
  11. Click apply
  12. Click close

To run debugger:

*** Make sure your bit file has been loaded onto the board

  1. Click on run->debug-<Project Name>

How to change perspectives:

  1. Click on Window->Open Perspective -> other..
  2. Click on the perspective you want
  3. Click on OK

Using the debugger

* Make sure you are the debug perspective

In the debug perspective there are the following default windows with their uses described below

  • debug - defaults to the upper left window. The following buttons are active:
  • run - continues running the program until a breakpoint is reached
  • pause - pause the program
  • stop - terminates the run of the program and will disconnect from grmon. Also clears the debug window.
  • Restart - goes back to the beginning of the program
  • step into - execute highlighted instruction and steps into function calls
  • step over - execute the highligted instruction and does not step into functions
  • data window - defaults to the upper right window - -has the following default tabs
  • variables - shows the values of the variables of the current function. You can right click on the variable and change its value.
  • Breakpoints - Shows all the breakpoints in your code.
  • Expressions - You can specify different expressions and view their value as the program progresses
  • Modules - Displays all the symbols of your assembly.
  • Registers - Displays the current values of all of the registers. You can right click on a register and change its value.
  • code window - defaults to the middle left window. Displays the code that you are debugging and allows you to set/clear breakpoints
  • Setting breakpoints - right click on the area to the left of the line where you want to place a breakpoint
  • The current line to be executed will be highlighted in green.
  • outline window - defaults to the middle right window.The outline window allows you to jump to points in your code specified by your outline. The window displays the following:
  • includes statements
  • function prototypes
  • functions
  • console window - defaults to the bottom window. Dsplays various outputs from your program/grmon/debugger etc. The following tabs give information about the current run of your program.
  • Terminate - terminates the debug process
  • clear console - clears the current displayed console
  • scroll lock - keeps the console from scrolling
  • pin console - keeps the console from changing automatically
  • display selected console - switches to a different console view
  • open console - opens a new console
  • memory - displays values of memory at locations that you specify. The memory tab has the following buttons.
  • add memory monitor - request a memory address to view
  • remove memory monitor - removes the selected monitor
  • remove all - removes all memory monitors
  • disassembly - will show up in the outline window by default and allows you to see the assembly for your code.

Other windows and windows that you can be closed can be reopened by clicking on window-> show view and selecting the window you wish to view

Installation instructions

  1. Install Eclipse (3.1.2 or better) and the Java Runtime Environment (1.4 or better) from
  1. To install CDT plug-in:
  2. launch eclipse
  3. click on: help->software update->find and install
  4. select: "Search for new features to install" hit next
  5. create a new remote site
  6. Name: CDT
  7. URL:
  8. make sure just CDT's box is checked and hit finish
  9. select a mirror and hit ok
  10. follow instructions and install the latest version of the CDT
  11. Reload the workspace when prompted.
  12. To install Gaisler CDT plug-in, repeat above except use:
  13. Name: Gaisler CDT plug-in
  14. URL:

C:\Documents and Settings\ed\Application Data\Microsoft\Templates\Normal.dot

Page 1 of 4