Thursday, April 24, 2008

WinARM

WinARM is a collection of GNU and other tools to develop software for the ARM-family of controllers/processors on MS-Windows-hosts. Unlike other collections WinARM does not depend on a cygwin or mingw-environment. All needed tools are in the distribution-package. WinARM has been tested with Philips LPC2106, Philips LPC2129, Philips LPC2138, Philips LPC2148 and Atmel AT91SAM7S64, AT91SAM7S256, AT91RM9200 ARM7TDMI(-S) controllers (the list is based on own tests and user feedback). The gnu-toolchain and the supplied tools should work with all microcontrollers based on ARM(-TDMI/Thumb etc.) architecture. WinARM has been made in the spirit of WinAVR which is a collection for Atmel AVR 8bit-Controllers.

Download the WinARM 20060606 zip-Archive here (ca. 95 Megabytes, "Readme.htm" of this version)
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/WinARM-20060606.zip

ECLIPSE CDT

To use Eclipse as an Integrated Development Environment for your toolchain you need:

* a Java Runtime Environment (JRE) by Sun,
* Eclipse itself,
* the Zylin version of CDT for Windows,
* and the Zylin CDT plugin to improve support for the GDB embedded debugging.
Download and install?

Only download, and do not install these files yet, I assumed you will download the files in your temp directory (c:\temp). We will install these files later.


Java Runtime Environment (JRE)

First we will check if the JRE is already installed on your PC. Therefore open a command prompt and type:

C:\>java -version

The result should look like:

java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)


If the Java Runtime Environment (JRE) is not installed on your PC, you can download the JRE from the following Sun website:

Java SE Downloads (about 16 MB)

Here you will find the "JRE 5.0 Update 7" (that was the current version when I created this tutorial). Download the JRE and save it in the temp directory.

(Note: The Zylin plugin does not work with java 1.4.2)


Eclipse CDT and Zylin plugin:

Zylin made some modifications in Eclipse CDT for Windows and created a plugin to improve the support for GDB embedded debugging in CDT.

The Eclipse Platform Runtime Binary, the Eclipse CDT and the GDB embedded plugin are included in the installer, which you can find at the front page.


Let's start with the JRE (1). If the JRE was not installed on your PC, start the installer and follow the instructions. After the JRE installation start the install program for the IDE (2) and follow the instruction.


How to use?

The next section is a pretty large one. Go ahead and take a quick break. Visite the facilities or brew a fresh pot of tea. When you get back, we will start with Eclipse.

The installer creates a desktop icon for starting Eclipse. Click on this icon to start the Eclipse IDE.

After the start of Eclipse you should see the following splash screen:



If not, you have a problem with the Java Runtime Environment. After a while Eclipse want to know where to store your projects:



I will use D:\Projekte\EclipseWorkspace for the Eclipse workspace. Enter your directory and press "OK". Now the following "Welcome" window will appear:



Now click at the "Workbench" icon at the right edge of the window, and the next window will look like:



This is the "Resource Perspective", but we need to open the "C/C++ Perspective". Use "Window / Open Perspective / Other ..."




The next window will be opened:




Select "C/C++" and press the "OK" button. Now the "C/C++" and
"Resource Perspective" are part of the window:





We only need the "C/C++ Perspective" and may close the Resource one. Therefore right click at the Resource icon and close the Perspective:



Now the window should look like:

Basic Environment Creation

The basic things required for the ARM Developement are,

Enviroment : Eclipse with CDT
GNU compiler : WinARM
Free debugger : OpenOCD
JTAG-debugger : OLIMEX ARM-USB-TINY