Using Open Source Tools for ATMEL AVR Development

This section provides a guide for using open source tools such as WinAVR Compiler, Eclipse IDE and AVR Eclipse Plugin for ATMEL AVR development.

- Install WinAVR20080610. Can download from http://winavr.sourceforge.net/download.html , How to fix a problem of USBasp with WinAVR20080610 http://www.friendlyarm.com/fixed-a-problem-usbasp-in-winavr20080610/

- Install Eclipse 3.4 Ganymede by select Eclipse IDE for C/C++ Developers papckage, included CDT 5.0 (Eclipse’s C/C++ Development Tooling) in the package. When download complete. unzip to your install drive such as C:\eclipse , open eclipse program and select Workbench icon (only first time).

ATMEL AVR Eclipse Plugin

- Install AVR Eclipse Plugin by go to menu Help / Software Updates, when open a new window select Available Software, and press Add Site… button. add http://avr-eclipse.sourceforge.net/updatesite in Location: and press OK

ATMEL AVR Eclipse Plugin

Select AVR Eclipse Plugin and press install… button, the update will be start.

ATMEL AVR Eclipse Plugin

The next window review and confirm the package will be install, press Finish

ATMEL AVR Eclipse Plugin

Later the update process will restart Eclipse, press Yes. Now you have installed the AVR Eclipse plugin :)

ATMEL AVR Eclipse Plugin

Enjoy! Now you have open source IDE and C Compiler on Windows OS. Next step i will show how to configure the AVR Project on Eclipse IDE.

Fixed a problem USBasp in WinAVR20080610

Now, Winavr have update a new version WinAR20080610. But it have problem when use AVRdude (include with WinAVR20080610 package) with USBasp AVR Programmer. AVRdude can’t detect USBasp device, have error same following:

avrdude: error: could not find USB device “USBasp” with vid=0×16c0 pid=0×5dc

Because a driver version 0.1.10.1 (USBasp driver) not compatible with libusb DLL version 0.1.12.1 in WinAVR20080610. If you have a old USBasp driver still in your computer. must uninstall before. Can uninstall by goto Star->Control Panel->System->Hardware->Device Manager When Windows recognize with your USBasp device.

usbasp AVR-ISP Lite WinAVR

Download a new Windows driver (libusb DLL 0.1.12.1) for USBasp from USBasp-driver-0.1.12.1.zip unplug USBasp then plugin USBasp to USB Port again. Windows will recognize and request to install a new driver.

usbasp AVR-ISP Lite WinAVR

When install complete, test USBasp device again. Now work prefect.

usbasp AVR-ISP Lite WinAVR

Thanks thomasATulrichradigDE from avrfreaks for a new driver. 

Install Eclipse 3.3 on Ubuntu 8.04

On Ubuntu we want a good IDE for developing programs for the microcontrollers, such as Atmel AVR, ARM MCUs. Eclipse is a prefect IDE with many features, come with Open Source and have many document, plugin.

But on Ubuntu 8.04 not have Eclipse 3.3 in repository, you must use manual install.

1. Before install Eclipse 3.3 you must have a Java 6 from SUN on your computer. check on Ubuntu

$java -version

If your computer have a Java GNU version, you must install a Java 6 from SUN

$sudo aptitude install sun-java6-jdk

When install complete, check a default jvm by:

$update-java-alternatives -l

you should get output similar to this:

>java-6-sun 63 /usr/lib/jvm/java-6-sun
>java-gcj 1042 /usr/lib/jvm/java-gcj

set the right jvm by use command:

$sudo update-java-alternatives -s java-6-sun

and insert /usr/lib/jvm/java-6-sun on the top of file /etc/jvm ($sudo gedit /etc/jvm)

$cat /etc/jvm
# This file defines the default system JVM search order. Each
# JVM should list their JAVA_HOME compatible directory in this file.
# The default system JVM is the first one available from top to
# bottom.
/usr/lib/jvm/java-6-sun
/usr/lib/jvm/java-gcj
/usr/lib/jvm/ia32-java-1.5.0-sun
/usr/lib/jvm/java-1.5.0-sun
/usr

Check a version of Java again.

$java -version
java version “1.6.0_06″
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)

All Ok :)

2. Download Eclipse 3.3.2 from here

When download complete, make a new folder for install Eclipse

$sudo mkdir /usr/local/opt

Extract Eclipse archive to a new folder

tar -zxf your.downloaded.eclipse.version.tar.gz -C /usr/local/opt

Run Eclipse

$cd /usr/local/opt/eclipse
$./eclipse

Enjoy!!

PS. Eclipse out a new version 3.4 but i still never test it yet.