Graynomad:
would it be possible to use the Arduino IDE ( for Arduino DUE ) to compile the code for the LPC810 ?
Not as it is, I think you would have to add your own variant file and core libraries but that's not an area I'm very familiar with.
@Bob/Chris, is it worth trying to develop an LPC Arduino port that will support several versions of LPC? It's certainly been an interest of mine but TBH I'm probably more HW than SW. I can certainly write code (was employed to do so for many years) but it's the toolchain stuff and organisation of files to allow all different CPUs that I struggle with.
Yes and yes! Struggling with toolchains is right up my creek. I have been wanting to get more into extending Arduino IDE so I decided to bite the bullet and have a go. Arduino 1.5.x makes it quite easy, it already has GCC-ARM compiler.
So what I did is take Chris's code and with a few minor changes put it into an Arduino structure. Seems to build OK with the Arduino 1.5.7 IDE but I don't have an 810 to test with. (I've got nearly a dozen LPC dev boards, but nothing with 8xx series, so I have ordered one from ebay.) I haven't looked at uploading, this was more of a test of the concept.
It actually went better than I expected, the Arduino team have made it really easy! Most of the code went into LPC8/cores/lpc810 and the Arduino framework builds it automatically. It should be easy to create new core types and board variants.
I'm not sure where example sketches should go, I compiled the blink sketch for 810 with a small change (include of sketch_ino.h not required), I haven't tried the others.
arduino_lpc810 by donotdespisethesnake, on Flickr
There are some linker warnings I don't really understand, and no doubt some other loose ends, e.g. Linux, Mac etc.
The complete add-on package is attached. It should be unzipped into the Arduino sketch folder, so you get a path like "C:\Users\bob\Documents\Arduino\hardware\OpenNxp..."
I propose to create a github repository to contain the code. Any comments on that idea or anything else please fire away.
ETA: I've now compiled all the sketches and included into package.
lpc810_for_arduino.zip (66 KB)