- Fri Dec 23, 2005 12:20 am
Just though I would make a comment for those like myself spending countless hours trying to play with the Olimex boards using IAR and the LPC2000 Flash utility.
I use IAR on MSP430's regularly but new to LPC2000's. I ordered a LPC-P2138, CFAX, CFAX board, and JTAG cable the other day, but the JTAG was backordered.
I received everything but that and tried for 2 days to play with the P2138 and LPC2000 Flash Utility as a workaround until I get the JTAG cable and found all kind of posts everywhere from "it's possible" to "it's not" and without anything saying how if possible. I even went though the Tutorial on the SparkFun's website for using Eclipse and decided that route was just to complex and "way not" worth the trouble. I decided just to wait on the cable and use IAR (one IDE without 20 other add-ons and processes to do a 5 minute job). While waiting I found it is very possible and very simple to use IAR and the utility and NOT use the JTAG at all.
The controversy all stemmed around IAR being able to create a HEX file at all to it's ability to create a valid HEX file in order for the Flash Utility to use.
It's very possible and simple for those needing to do it like myself for one reason or another. Just go into "Options..." for the project by right clicking on the project name, go to "Linker", look for the "Format" section and click "Other", which un-clicks "Debug information for C-Spy", and select "intel-extended" for "Output format". Leave "Format variant" as "none". Save the settings and re-compile. Now the output file is the same name and extension as before but now in hex.
The Flash Utility can now use this file to flash the LPC21xx. The utility will lead you to believe it needs to be ".HEX" but you can leave it as ".a79" or whatever and it works.
Not sure it will work for everyone but it works flawlessly for me and the utility has no problems with it's name nor format as indicated in so many forums. There's no need to use SUN Java Runtime, Eclipse IDE, Eclipse CDT Plug-in for C++/C Development, CYGWIN GNU C++/C Compiler and Toolset for Windows, GNUARM GNU C++/C Compiler for ARM Targets, GNUARM Insight Debugger, Philips Flash Programmer for LPC2100 Family CPUs, and Macraigor OCDremote for JTAG debugging all together for such a simple task.
As I said, I'm using IAR and the utility alone for the LPC-P2138 as well as IAR generated example code for the P2138 and don't now about all of the other boards. Just make sure you use sample code for IAR and not the other IDEs/Compilers when trying this route. Making things too complicated and tedious takes the enjoyment out of messing with it at all.