Tutorial: Avr5 - First installation and application compilation on Windows

From ErikaWiki

Revision as of 08:40, 19 July 2012 by Shiva (Talk | contribs)
Jump to: navigation, search

Contents

RT-Druid and Erika Enterprise tutorial for AVR5 4

This small tutorial describes a set of steps needed to compile a simple application that shows the main features of Erika Enterprise and RT-Druid for the AVR platform.

This tutorial has been tested on a STK50X board produced by Atmel and on a Crossbow Mib520 board.

Installing Erika Enterprise and RT-Druid on Microsoft Windows 5

This chapter will guide the developer to the installation procedure of Erika Enterprise and RT-Druid for the AVR platform.

Warning:
The Cygwin install pathname, the Erika Enterprise install pathname, and the pathname of RT-Druid workspaces
where the user projects reside, MUST NOT contain any blank space, otherwise Erika Enterprise may not work properly.

E.g., C:\MyApplications\Evidence\ and C:\MyApplications\Cygwin\ are acceptable,
while C:\My Applications\Evidence\ or C:\My Applications\Cygwin\ MUST be avoided.

This is a known issue that will soon be fixed.

The installation of Erika Enterprise and RT-Druid is composed by the following packages:

  • The Eclipse development environment, which is used by RT-Druid to provide the basic development environment for Erika Enterprise applications.
  • The Eclipse environment is based on the Java platform, so that a working Java Runtime Environment must be present for using RT-Druid.
  • The RT-Druid plugins, which provide the code generation for Erika Enterprise and Erika Enterprise for Eclipse.
  • The Erika Enterprise source code.
  • A subset of the Cygwin environment, including a set of utilities like make, gawk, and few others, which are used during the compilation process of an Erika Enterprise application.
  • A set of examples for the AVR Platform, which can be used to compile a first set of running examples for the Atmel STK50X board, the Crossbow MIB5X0 board. These applications are organized in “templates”, available at project creation.

To install the software, execute the following steps:

  • Install your favourite Java runtime environment, which is needed to run RT-Druid; in fact, RT-Druid is a plugin of the Eclipse editor, which requires Java to be executed.
  • Install the AVR-Gcc Compiler, available from theWinAVR sourceforge.net project at the website http://winavr.sourceforge.net/. Even in this case, you can use the default install directory. When it is asked to change the default environment, please do accept.
  • Run the Erika Enterprise and RT-Druid installer.
  • The installer will prompt a list of packages which can be installed. Select all the packages you wish to install and continue the installation procedure (see Figure 2.1).
File:Mypic.png
Figure 2.1: This screenshot shows the dialog box with the available install packages.
  • At this point, please check the first line of the file evidencedir\bin\mymake_cygwin.bat (where evidencedir is the directory you chose during the installation). For example, if Cygwin is installed inside C:\cygwin, then the first line of the file should look like the following one:
@set EE_BASH_PATH=C:\ cygwin \ bin\ bash
...that is, the line contains the correct path to the bash.exe file in your Cygwin installation. If you accepted the default settings, the correct pathname should be C:\cygwin\bin\bash as specified in the example before.
Note:
We ask to perform this check because it seems that on some Windows machines the Cygwin installer
does not correctly set the registry keys used by the Erika Enterprise installer.
  • If you are going to use the Atmel stk50x or the Crossbow Mib5x0 boards, you can use the UISP programmer to program the AVR microcontroller. To Install the UISP software, which is an AVR In-system Programmer using the USB connection provided by the boards cited above, please follow the instructions below:

The rest of this tutorial supposes that the AVR-Gcc Compiler and binutils is installed within the C:\WinAVR-20071221\bin directory. Please note that these values may be different from the settings you have chosen on your machine.

First RT-Druid startup and configuration 8

x



Compiling your first Erika Enterprise demo for AVR5

x

Personal tools