Ethernut Home Hardware Firmware Tools Download Community
Search | Legals | Deutsch

Ethernut developement with Eclipse and openocd ( ARM only at the moment )

This document contains instuctions on installing Eclipse, its CDT plugin and zylin's Embedded CDT plugin. Installing OpenOCD and finally building the Ethernut samples with Eclipse.

How to unpack archives:


$ gunzip < [archive].tar.gz | tar xvf -
$ bunzip2 < [archive].tar.bz2 | tar xvf -

To start developement with eclipse set up Eclipse with zylin's Embedded CDT plugin and import the projects from your enut30e-app directory. This is how it's done.

Get Eclipse:

At click on 'Download Eclipse' then choose 'Eclipse Classic'. Just unpack Eclipse. If no Java Runtime Environment since 1.5 is istalled get one or to make Eclipse able to run from USB-Stick unpack Java JRE into '[eclipse_root]/jre'.

Get CDT plugin:

At click on 'Language IDE' there on the Disks after 'C/C++ IDE'. Now on the link ( then on '[version]([date])', now choose a mirror. After download unzip 'cdt-master-[]' into [eclipse_root].

Get zylin's Embedded CDT for Eclipse:

At go to 'Products' and then to 'Zylin Embedded CDT' there click on 'Latest Snapshot' and get 'zylincdt[version].zip' and 'embeddedcdt[version]'. After download untar 'zylincdt' and 'embeddedcdt' into [eclipse_root] this adds the zylin plugin and the embeddedcdt plugin to Eclipse.

Install openocd:

At click on 'view all project files' then on 'openocd_[version]-src.tar.gz'. After download untar 'openocd_[version]-src.tar.gz', and read the README. following the README run

$ ./bootstrap
followed from the usual
$ ./configure
$ make
$ make install

Start openocd:

$ openocd -f enut3ocd.cfg
I suggest you start openocd in an extra shell. In the case you have to end and restart openocd because it hangs, you can just abort it with crtl+c which is much easier and faster than kill the process.

Open Examples into Eclipse:

Click under 'File' on 'Import' there select 'General' followed by 'Existing Projects into Workspace' then click 'next'. At 'Select root directory' enter the location of 'enut30e-app' under 'Projects' select what project you want to import. If you want to work with copys select 'Copy projects into workspace'. Click 'finish' to be ready for examine the samples.

Building Examples with Eclipse:

Notice: arm-elf-gcc has to be on the PATH to work without the necessity of changes of the project properties.

It might be necessary to add your PATH to the Environment Variables. At 'Project' click on 'Properties' there on 'C/C++ Build' then on 'Environment' now click 'new'. At 'Name' enter PATH and at 'Value' enter the content of your PATH (which should contain the path of your avr/arm install).

To build the samples either click under 'Project' on 'Build all' to build them all at once or select your favotite project and click under 'Project' on 'build project'.

You will find the binary either under [workspace]/[project] or under [enut30e-app]/[project] depending on the selection of 'Copy projects into workspace' from the import.