Home | Screen shots | Documentation | Download | Contact | Blog

How to configure AVR eclipse

AVR eclipse is a popular, but complex integrated development environment with which you can develop and run arduino software. It has a huge amount of possibilities which make configuring it to work with emulare a non-trivial excercise.

Necessities

To use emulare as the emulator in a debug session with eclipse you will need:

You can get emulare from the sourceforge page here.

You can get eclipse from here.

Use the IDE for C/C++ developpers.

Eclipse Plug-Ins can be installed from inside the eclipse IDE. The AVR eclipse Plug-In website has lots of information on how to install here and configure the Plug-In here.

Be sure to notice that the Arduino is an ATMEGA328p controller running at 16Mhz.

eclipse target hardware

Running emulare from eclipse.

The first thing we want to do is to conveniently be able to load the emulare emulator. This is best done using External tools.

Click on the icon and choose "External Tools Configurations..."

External tools configuration


Select Program and press the new Icon. You will get a screen like:

filling out emulare

Fill out the name (emulare) and the location of where you installed the emulator. And then press Apply.

Then go to the Common tab and check the checkbox next to External Tools:

External tools checked

Press Apply and Close.

The program will now be available through the External Tools Icon:

emulare tools item

Click on 1 emulare and emulare will appear.

show emulare

Creating a debug configuration

Press on the drop down menu next to the debug icon and choose Debug Configurations ...

debug configurations

Choose GDB Hardware Debugging in the list box and press the "new launch configuration" icon. This will create a new Debug configuration.

create new config


Go to the Debugger tab

debugger tab

Change the following settings:

GDB Command: should be avr-gdb

Change the Port number to 4343

Go to the Startup tab

startup tab



Change the following settings:

Load image: check the checkbox and fill out the absolute path to the elf file created with the build of your project (the relative pah will not work)

runtime options

In Runtime Options:

    Then go to the Common tab and check the checkbox at Display in favorites menu:

common tab


Starting a debug session

Now with emulare running, select the drop down menu. From the menu select the item that ends in Debug.


starting debug session

This will start the debug session. Eclipse will want to go to the debug perspective and show you the message:

confirm perspective switch

Press the Yes button. This will rearange your windows so you can easily start debugging your application.


debug perspective


Eclipse insists on always creating an other debug configuration, without you doing anything about it. This one will not work at all. You will get an error message instead.


Problem occured






  COPYRIGHT 2010 Imre Leber