Tutorial: Installing ERIKA and RT-Druid on a Linux host

From ErikaWiki

Revision as of 12:13, 2 February 2011 by Rischiav (Talk | contribs)
Jump to: navigation, search

Contents

Introduction

This small tutorial describes the steps needed to download, compile and run a simple application showing the main features of Erika Enterprise and RT-Druid for the Microchip dsPIC DSC platform.

This tutorial has been tested on a FLEX board produced by Evidence and Embedded Solutions. Moreover, the needed software has been installed and tested on an Ubuntu 11.04 Natty Narwhal but the installation process should be adapted to almost all the other releases.

Even if all the steps needed to run an application will be depicted, a preliminary knowledge on the Microchip MPLAB X IDE and its debug environment should be useful to the reader.

Note for Linux Users

If you are using a Linux distribution please look carefully at the following warnings:

  1. The Evidence package installation path should NOT contain directory name with spaces. e.g. use ~/Evidence.
  2. The Scilab package installation path should NOT contain directory name with spaces: e.g. use ~/Evidence/scicoslab-4.4b7.
  3. It is strongly encouraged the adoption of the real path instead of using symbolic links and aliases.
  4. Please install all the Microchip compilers into their default directory (/opt/XXXX).

Prerequisites

Before proceeding with the installation process it should be useful to completely update the packages installed in you system to the latest version. To update all the packages open a Terminal window and execute the following commands:

sudo apt-get update
sudo apt-get upgrade

To execute the MPLAB X IDE a 32bit JRE have to be installed. Before to proceed with the JRE installation you need to check the multiverse repository enabled. You can perform this step from the Ubuntu Software Center and select "Edit -> Software Sources...", after inserting you password you must check the "Software restricetd by copiright or legal issues (multiverse)" option; otherwise you can enable this repository by editing the source.list, to do that in a Terminal window execute:

sudo gedit /etc/apt/sources.list

Then on the gedit window uncomment the line:

deb http://archive.canonical.com/ubuntu maverick partner

by removing the "#" character, then save the file and close gedit.


Finally to install the JRE on a Terminal window insert:

sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

Please notice that by installing a 64bit JRE RT-Druid will not work properly.

Installing MPLAB X IDE

To download the the MPLAB X IDE in a Terminal window execute:

cd ~

mkdir mplab_temp
cd mplab_temp

wget http://ww1.microchip.com/downloads/mplab/X_Beta/mplabxidebeta32.bin
wget http://ww1.microchip.com/downloads/mplab/X_Beta/mplabc18.bin
wget http://ww1.microchip.com/downloads/mplab/X_Beta/mplabc30.bin
wget http://ww1.microchip.com/downloads/mplab/X_Beta/mplabc32.bin

chmod a+x *.bin

sudo ./mplabxidebeta32.bin
sudo ./mplabc32.bin
sudo ./mplabc30.bin
sudo ./mplabc18.bin

Please notice that this step can require few minutes depending on the downloading speed.
You can speedup this process by downloading and installing only the compiles needed by your platform. Please remember to reboot you system after the installation of the last compiler.


At the end of the installation process either the directory and the bin files can be removed:

cd ~
rm -r mplab_temp


To enable the correct execution of the MPLAB X IDE you must set the owner of the MPLAB X IDE

sudo chown user:user ~/Desktop/MPLAB\ X\ IDE\ beta4.desktop

please notice that "user" must be substitued with your username on the Linux host. Moreover, the location of the file depends on the language of your installed OS, e.g. for italian people the file could be located on ~/Scrivania/MPLAB\ X\ IDE\ beta4.desktop.


Moreover, to enable MPLAB X IDE to connect with the supported programmers you must set the execution flag to the file dorun.sh

sudo chmod +x /opt/microchip/mplab_ide/ide/bin/nativeexecution/dorun.sh


For furter information on MPLAB X IDE and its supported programmers please visit
http://ww1.microchip.com/downloads/mplab/X_Beta
and/or download
http://ww1.microchip.com/downloads/mplab/X_Beta/Getting_Started_with_MPLAB-X.pdf

Installing ERIKA Enterprise and RT-Druid on Linux

To download RT-Druid you can select the correct file from the webpage:
http://erika.tuxfamily.org/erika-for-multiple-devices/betaversionerikaenterprisertdruid160.html
or simply insert in a Terminal window

cd ~
mkdir eclipse_temp
cd eclipse_temp

wget http://download.tuxfamily.org/erika/webdownload/rtdruid_eclipse37/eclipse_3_7_ready_to_use_LINUX.zip
unzip eclipse_3_7_ready_to_use_LINUX.zip
mkdir ../Evidence/
mv eclipse ../Evidence

Please notice that the download process can require few minutes depending on the downloading speed.

You can now remove the downloaded file by

cd ~
rm -r eclipse_temp

To enable a desktop shortcut to the ~/Evidence/eclipse/eclipse file you can insert in a Terminal window

ln -s ~/Evidence/eclipse/eclipse eclipse

First RT-Druid startup and configuration

By opening Eclipse you will be prompted with a "Welcome" screen

This screenshot shows the Eclipse welcome window.


To enable the updates of RT-Driud and its related distribution of Erika Enterprise select "Help -> Install New Software"

This screenshot shows how to select the "New Install Software".

In the "Install" window

This screenshot shows the Eclipse "Install" window.

select add and enter a reference name for the file repository (e.g. RT-Druid) and the link
http://download.tuxfamily.org/erika/webdownload/rtdruid_beta

This screenshot shows the Eclipse "Add Repository" window with the correct parameters.

by selecting "Ok" you will be prompted with a new screen. You have to select all RT-Druid sources. To speedup the update process you can unselect the option "Contact all site during install to find required software".

This screenshot shows the Eclipse "Install" window with the correct parameters.

Along the update process you may be prompted for a "Security Warning" simply click on "Ok" to continue with the process. Finally please restart Eclipse when asked by the installer.


You can close the "Welcome" screen by selecting "Workbench" icon

This screenshot shows the Eclipse "Install" window with the correct parameters.
then to remove the autobuild you can uncheck "Project -> Build Automatically"

rt-driud.noautobuild.png

To select the compiler for C30 /opt/microchip/mplabc30/v3.24/



To Select the compiler for C32 /opt/microchip/mplabc32/v1.11a/

Compiling your first ERIKA Enterprise demo

Running your first ERIKA Enterprise demo

How to use ERIKA sources from svn

Personal tools