Main Menu
Home
AVR News
Atmel AVR
AVR Development Tools
Valuable Tools
WinAVR toolset
Makefile for WinAVR
AVR Virtual Simulators
Hardware for prototyping
GCC and AVR-GCC
Short introduction to C
AVR-GCC Tutorial
Example AVR Projects
AVR-GCC articles
WinAVR Site Map
Scienceprog FORUM
ScienceProg BLOG
Disclaimer
WinARM Tutorial
Login Form





Lost Password?
No account yet? Register
Latest comments
Accessing AVR microcontroller...
You need to read PORTD 5th bit and...
More...

Accessing AVR microcontroller...
Hello! How can I do this with GCC?:...
More...

Running TX433 and RX433 RF...
I will consider this. Thank you for...
More...

Running TX433 and RX433 RF...
Please write a simple article about how...
More...

Using Eclipse as IDE for...
It is only a GUI, that makes easier to...
More...

Syndicate
Friendly sites

Related Items:

Latest News
Using Eclipse as IDE for WinAVR compiler PDF Print E-mail
Written by Administrator   
Friday, 28 December 2007
Last Updated ( Friday, 28 December 2007 )

WinAVR comes with Programmers Notepad UI by default. It is very powerful editor, but if you want more robust UI with better project management abilities you can try Java based Eclipse IDE. It is universal open source IDE which supports almost any compiler by using plugins. Eclipse has some nice features that makes it attractive, like Subversion integration, code completion in editor.

Thomas Holland has been working on AVR plugin for Eclipse which allows to use Eclipse features with AVR-GCC compiler. The newest release has nice set of features and updates like: automatic makefile generation, MCU type and clock frequency can be selected during project creation, project can be compiled for debug only or as complete release with flashable hex files, tool-chain has integrated assembler, nice viewer showing information about processor used where you can find all registers, ports, interrupts in one convenient place for quick pick-up.

Eclipse AVR device explorer

Eclipse doesn't require installation, just extract to some directory. You just need to set path to projects folder during first run. AVR Plugin also doesn't need any special installations, just extract to Eclipse directory and thats it. Also plugin can be installed remotely by using Eclipse Software update feature.

I just tried to compile one of my project with this environment – it worked without problems. Lets go through how to compile your first AVR-GCC project in Eclipse IDE. First of all make sure you have latest WinAVR tools installed. Then download Eclipse for C/C++ for Windows platform:

Image

Extract it to some directory. Then download plugin and extract it to Eclipse directory(just follow original explanation). When its all set, we can start new project. I am using project files created so I will need to add then to Eclipse project only. But first of all... In Eclipse select New->Project and then select C Project.

New AVR-GCC project in Eclipse

Select AVR Cross Target Application In Toolchain section you can see WinAVR Toolchain selected. Enter project name and click Next. In next window you will have to select build configurations that include various settings that have to be included in makefile. Settings can be saved separately for debug and release configurations. Lets say wee select Release configuration.

Image

By pressing advanced settings you may change additional makefile settings. But lets leave then by default. Press Next button.

AVR clock source

Here you must select AVR microcontroller and its clock frequency. After selections are done click Finish button to prepare new project. To add files to project you can create new or add existing source files. I just used drag and drop feature to add files to project tree. Files also are copied to project folder physically.

Eclipse AVR project

I made IDE window smaller to show how all workspace look like. In the left you can see project tree where source files are added. Next window is for file contents. Then goes project outline. And the bottom are has several tabs for displaying problems, properties, console and earlier mentioned AVR device explorer. I really like the way Eclipse extracts outline from source file. It is easy to find and navigate by selecting variables, functions and defines. Source code outlining is also pleasing. Even things like #ifdef ...#endif areas are greyed if not defined.

Compiled release is placed in different folder where all object, hex and other compilation products are saved – this way it keeps source folder clean.

My first impression with AVR Plugin for Eclipse is very good. I would say this is must try tool. As it is quite new plugin, I would expect bugs or problems appearing. I think main problems may appear with makefile generation, so you can always use external makefile if needed. As far as I tested this plugin with basic AVR programs it worked without problems.

AVR Plugin for Eclipse home page: http://avr-eclipse.sourceforge.net;

AVR Plugin for Eclipse can be downloaded here;

Eclipse IDE can be downloaded here: http://www.eclipse.org/downloads/;

Latest WinAVR can be downloaded here.


Related Items:

   

Users' Comments  
 

Average user rating

 

Display 2 of 2 comments

debugging in eclipse

By: iase on 20-03-2008 09:53

hi all 
 
is possible debugging program in eclipse or is compiler only??

 

» Report this comment to administrator

» Reply to this comment...

Re:debugging in eclipse

By: admin on 21-03-2008 15:05

It is only a GUI, that makes easier to edit and compile avr-gcc programs.

 

» Report this comment to administrator

» Reply to this comment...

Display 2 of 2 comments



Add your comment
Only registered users can comment an article. Please login or register.


mXcomment 1.0.6 © 2007-2008 - visualclinic.fr
License Creative Commons - Some rights reserved
Next >

© 2008 WinAVR AVR-GCC Tutorial
Joomla! is Free Software released under the GNU/GPL License.