The JTAG programmer from Olimex does come with a CD that is installs "ARM GCC for Dummies" to assist in programming ARM processors. Now, I am no dummy when it comes to GCC or programming, but I figured this tool was my best bet to start.
I installed the tools from the CD exactly as the instructions provided and proceeded to load up the Eclipse IDE. Their example "blinkie LED" project opened immediately, so I figured this would be a piece of cake. Imagine my surprise when the JTAG failed to program the microcontroller...
After spending about two hours meddling with different versions of GCC, changing linker settings, editing Windows Environmental variables, I began to wonder how anyone unfamiliar with programming tools, never mind GCC, would have ever been able to figure this all out. Once I finally got the JTAG to work and was able to step through a program, I deleted all the tools and started from scratch to find the right combination of tools to get everything up and running. The final solution (discovered through much experimentation!) is not so bad however.
These instructions will get you up and running in Windows if you are provided with the installer "OLIMEX-GCCFD-190207.EXE" If you have a more recent version, it may just well work out of the box.
1) Run installer from CD, install JRE if necessary
2) Plug in JTAG board, three times you will be asked for the location of the driver, which will be "C:\GCCFD\Olimex OpenOCD Driver" (Still following stock directions)
3) Get the latest version of OpenOCD and install
4) Open the Eclipse IDE from your desktop
5) Go to Run -> External Tools -> External Tools...
6) Click on "OpenOCD" in the left pane
7) Change the "Location:" to "C:\Program Files\openocd-2007re141\bin\openocd-ftd2xx.exe" or substitute your new release here
8) Repeat steps 6 and 7 for OpenOCD Tiny if you're using the USB-only JTAG programmer
Now you're ready to program and debug on your LPC2148. Simply click Run -> External Tools -> OpenOCD to connect via JTAG, then click the 'bug' to start debugging.
So I finally was able to step through the demo program, only to find that I didn't have any blinking LEDs. A quick scan of the source code showed that the program was trying to blink LEDs on P0.10 and P0.11. I now realized this program was written for the larger LPC2148 development board.
There is a Status LED provided on my board connected to P1.24 which I decided to use instead. This requires a few tweaks to the firmware code to work correctly. All the information you really need is provided on page 82 of the LPC2148 user manual.
The header file included is intended for LPC210X processors. Assuming you want to get a demo up and running quickly, add the following defines to lpc210x.h, preferable in the GPIO section:
#define IO1DIR (*((volatile unsigned long *) 0xE0028018))
#define IO1SET (*((volatile unsigned long *) 0xE0028014))
#define IO1CLR (*((volatile unsigned long *) 0xE002801C))
These are all the 2148-specific definitions we'll need. Now, just change the pin that gets toggled in main.c:
Initialize();
IO1DIR |= 0x01000000; // P1.24 output
IO1SET = 0x01000000;
// endless loop to toggle the LED
while (1) {
for (j = 0; j < 500000; j++)
IO1SET = 0x01000000;
for (j = 0; j < 500000; j++) // wait 500 msec
IO1CLR = 0x01000000;
}
Being a slave to MS Visual Studio, the debugging shortcuts are engrained in my brain forever. After briefly changing the Eclipse shortcut preferences to mimic Visual Studio, I deployed the project to the LPC2148 board and got my blinking LED :) Sorry about the quality of the video, I really need to work on getting a camera with some better video capability.

