Note: If you order a USB programmer such as the Olimex USB-ARM-JTAG programmer, it comes with a CD that will install and set up all the required drivers and settings that this tutorial covers.
This is a brief tutorial on configuring Eclipse Ganymede for programming the ARM Cortex M3 on Windows XP. Codesourcery G++ will be the compiler and OpenOCD used to communicate with the MPU. Sample OpenOCD configurations for Parallel and USB JTAG devices will provided.
Step 1: Download Software
Before continuing download all of the following software packages (click read more to see full article)
Optional Components
Step 2: Install Software
Install Java Runtime
Download Java Runtime (required for Eclipse) and see Java.com for current install instructions.
Install Codesourcery G++
Download and run Codesourcery G++ Lite for ARM EABI (Win IA32 Installer) (arm-2009q1-161-arm-none-eabi.exe) and follow the installation prompts. A typical install will install the program along with the documentation and is recommended.

When prompted, Modify PATH for all users.

Install Eclipse and Update
Download Eclipse Ganymede IDE for C/C++ Developers to the directory of your choice.
Extract the contents of the downloaded file (eclipse-cpp-ganymede-SR2-win32.zip) to a new directory, c:\arm_dev\eclipse_cpp. Then, launch eclipse.exe in the directory you extracted it to. If you get a JVM incompatibility error add the following to the beginning of the windows PATH.
C:\Program Files\Java\jre6\bin;
When presented with the following dialoge, click the Browse button and create a new directory without spaces to use as the workspace. e.g. c:\arm_dev\eclipse_ws. Check the checkbox labeled "Use this as the default and do not ask again", then click OK.

You will then be presented with the default Eclipse workspace. The next step is to update Eclipse and add in a few components.

Within Eclipse, click the Help->Software Updates... then, click the Available Software tab. In the list click the [+] button next to "http://download.eclipse.org/tools/ctd/releases/ganymede", the the [+] by "CDT Optional Features". In the list, check the box for "Eclipse C/C++ GDB Hardware Debugging," as shown below, then click the Install button and follow the prompts.

Install OpenOCD
If you plan on using a parallel JTAG device (Wiggler Clone), install the giveIO by running c:\arm_dev\openocd_drivers\parport\install_giveio.bat or if you are using a USB JTAG, the appropriate FDTI driver.
Configuration Files
A note on OpenOCD Config Files
Every board will likely use a different configuration file for flashing and debugging. The examples I have provided here will work on the Olimex STM32-H103 Header Board from SparkFun Electronics. It is possible it will work with similar boards, but you may need to change memory locations and JTAG settings.
The config file is divided into several sections which are documented below.
Daemon Config - Start of File
#OpenOCD CONFIGURATION FILE
telnet_port 4444
gdb_port 3333
This initializes OpenOCD for external communication from a programmer/debugger such as Eclispe.
Interface
#PARALLEL INTERFACE- use this section for Wiggler and clones
interface parallel
jtag_speed 0
jtag_nsrst_delay 100
jtag_ntrst_delay 100
#USB FTDI INTERFACE - use this section for USB
interface ft2232
ft2232_device_desc "LM3S811 Evaluation Board A"
ft2232_layout evb_lm3s811
ft2232_vid_pid 0x0403 0xbcd9
jtag_speed 10
jtag_nsrst_delay 100
jtag_ntrst_delay 100
Use one of the above depending on the JTAG device you use.
Reset Configuration
#RESET CONFIG
#reset_config srst_only
#reset_config srst_only separate
reset_config trst_and_srst
The Olimex header board does not have separate resets, so we reset them both.
JTAG Scan Chain
#JTAG SCAN CHAIN
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe
This may vary depending on your board, but try it and see if it works.
MORE TO COME IN THIS SECTION
OpenOCD 0.1.0
This version of OpenOCD has not been tested yet, but you can attempt to configure it yourself if you wish.
Download OpenOCD from
Documentation
Install WinARM for Cortex M3
WinARM is a great resource for programs and source code.
Step 3: Configure the IDE
Configure Eclipse External Tools - OpenOCD