LPC810 mini ARM Prozessor in 8 pin dip package

GCC includes a C++ compiler! uuuh ... I thought it is arm-none-eabi-g++ I tried to compile C++ code with the make file included in my library: http://hobby-roboter.de/forum/download/file.php?id=191 but I was not successful. I'm not good in creating make-files therefore I gave it up to compile C++ and used C instead. But if anyone can rework the make-file for C++ it would be usefull.

BTW.: would it be possible to use the Arduino IDE ( for Arduino DUE ) to compile the code for the LPC810 ?

It always was possible to use C++ if you were happy to dick around with makefiles, I even think you could still use the IDE, but that was too much like hard work for me so I use the LPCXpresso environment and dev boards, really simple almost turnkey operation.

I haven't looked at the LPC range for a while, I just noticed the new LPC11U68, what a great chip and there's a Xpresso dev board for it with Arduino headers.

I may revisit my LARD framework with a view to converting to C++ and getting it running on this and also smaller chips like the LPC1114FN28 you mentioned Chris. It's a bit heavy on resources though, dunno if it will fit, I'll check out that chip now.

Meanwhile I'm grabbing the latest LPCXpresso IDE.


Rob

It was always possible to build C++ code for ARM using Eclipse and the embedded plugin, no dicking around with makefiles required :)

You can't beat the vendor tools for ease of use though, as long as you don't mind being locked into their parts.

OK, I remember there was a thread on the forum about getting the free IDE to work with C++, it's been a while now. IIRC it was just an option somewhere although I thought you had to point the IDE to your own makefile but maybe not. Either way the GCC compiler was the same.

I actually had a big winge to NXP about the fact that you had to pay for C++ when on other platforms like Arduino it was the default and free. Next thing I know I get asked to beta test the latest (at the time) IDE with C++ support, but by then I had lost interest.


Rob

I've got the Seeduino Arch Pro, so I would quite like to do an Arduino API for LPC1768, I've also got a few mini LPC boards which are ripe for Arduinoising (is that a word?).

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.


Rob

@Bob/Chris, is it worth trying to develop an LPC Arduino port that will support several versions of LPC?

I don't know. But it is always nice if there is a new microcontroller and an arduino lib avalilable. You can be very quick in getting the system running. Of course the arduino lib is not really for professional uses but for a first try it is quite good.

There is an arduino Lib for the STM-microcontrollers: https://github.com/leaflabs/libmaple

Probably it would be good to have some thing like that for the LPCs.

but it's the toolchain stuff and organisation of files to allow all different CPUs that I struggle with.

I hate struggling with the toolchain stuff, but it happens every time I use a new controller. 2-3 days of struggling ... That is the big advantage of the arduino ide: not really comfortable but quick to install.

I've got the Seeduino Arch Pro, so I would quite like to do an Arduino API for LPC1768 That board looks very promising: http://www.seeedstudio.com/wiki/Seeeduino_Arch

I haven't looked at the LPC range for a while, I just noticed the new LPC11U68 Also a nice board: http://www.nxp.com/demoboard/OM13058.html

Strange that the have the arduino pin out and not an arduino lib.

Strange that the have the arduino pin out and not an arduino lib.

There's an opportunity for a bright young lad.

I think I'll get one of those OM13058s, that 11U68 CPU looks fantastic and I like the LPC architecture. I've been looking at the SAM D21 of late as well, great features but the registers are a real cluster f*ck. I know it's stupid and only matters to system programmers but that sort of thing really pisses me off.


Rob

I think I'll get one of those OM13058s, Yes, thats a really nice board.

For many cost sensitive applications it would be usedful to have just the chip like the LPC810. It costs only around 80 EuroCent. Here I made an instruction guide on how make an LPC810 programmer with an Arduino Due: http://www.hobby-roboter.de/forum/viewtopic.php?f=4&t=152&p=602#p602

I've been looking at the SAM D21 of late as well, great features but the registers are a real cluster f*ck. Isn't it comming with the Arduino Zero?

http://arduino.cc/en/Main/ArduinoBoardZero

Probably they will provide the low level drivers ...

Probably they will provide the low level drivers

Yes they will, it's in progress as we speak. Like I said it's only an issue for "system" programmers, IE those who work with the bare metal, most Arduino users will neither know nor care.

For many cost sensitive applications it would be usedful to have just the chip like the LPC810

Yeah, having an ARM in an 8-pin DIP is amazing. Nice job with the Due programmer.


Rob

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. :slight_smile: 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)

Hi bobcousins,

your work is great :-)

I propose to create a github repository to contain the code. I forked a github repo for LPC-arduino here: https://github.com/ChrisMicro/LPC810_CodeBase But I don't know in detail how to work with github project teams.

ChrisMicro: your work is great :-)

I propose to create a github repository to contain the code. I forked a github repo for LPC-arduino here: https://github.com/ChrisMicro/LPC810_CodeBase But I don't know in detail how to work with github project teams.

Thanks, I really just rearranged it :)

I think it is fairly essential that the git folder structure reflects the target structure, i.e. a user can do a git pull and then copy the tree to Arduino folder. Otherwise it is a nightmare to manage. git doesn't provide an easy way to link files that have the same content, so it's best to copy the ones that are needed to the new place.

Collaboration can be done in github with pull requests which is good for large projects with lots of contributors, but does have more overhead. A lighter method is to specify named collaborators who have full access equivalent to the repo owner., or most often a combination of both.

We could also set up an "Organization" which would perhaps be a cleaner way to do it, I haven't tried that before. Looks pretty easy though. We need to think of a good name for it...

I just ordered two 11U68 Xpresso boards (OM13058), they have Arduino headers so would be suitable for a port. But while there I noticed that the "LPC800 / LPC812 MAX Board" has Arduino headers as well.

http://www.embeddedartists.com/products/lpcxpresso/lpc812_max.php

And there's the Arch board as well, that's 3 CPUs at least, plus I already have code for the 1227, and it looks like there are other Xpresso boards with Arduino headers, the LPC1549 for example

So far we're talking about maybe 3-5 CPUs, does anybody know if the peripherals are the same? Or does that mean 3-5 separate cores?

As for the Git stuff the "Organisation" sounds ok but as mentioned I have no idea about this stuff.

IF anything is going to happen though some organisation is required and also some deep thought to try and make a platform that can be used with all LPCs, or at least a good cross section of the models.

FWIW here's a link to my Git repo

https://github.com/Graynomad/LARD

I know almost nothing about Git except that it's totally unintelligible, it's a miracle I got those files up at all :)

My code has a LOT of stuff for error handling etc. For example every "thing" is an object (well it's C so a structure) with guard bytes at each end and a type byte, all functions that use that object test those bytes.

This is way over the top for the average Arduino project and too heavy for the 800 (about 26k last I looked I think, but that includes a LOT of code for strings etc that is non core). But my goal at the time was to make a framework that was more industrial strength.

Note that there are a lot of debugging calls to toggle pins (pin14high(); for example), ignore them.


Rob

Graynomad: So far we're talking about maybe 3-5 CPUs, does anybody know if the peripherals are the same? Or does that mean 3-5 separate cores?

IME peripherals are only identical within CPU families, e.g. LPC13xx, and may be similar or just quite different between families, so LPC11xx has some completely different peripherals to LPC13xx. e.g. the gpio block is a lot simpler. I haven't looked in detail across the range.

So it might be difficult to create a common library. I still think it is useful to have a single "LPC support package" though. Perhaps the point of commonality is the Arduino API, so at least users can move from one LPC to another with relative ease.

I'd be happy to set up and coordinate github activity. I think I will set up my own repo anyway and anyone can fork it as they wish, and I'd be quite happy to give people access.

Git has a lot of "advanced" features, more than I can fully understand, so I tend to use 2 or 3 basic operations and keep it simple. Github also has some great features which are quite easy to use, like the issue tracker.

I would like to set up a framework for other LPCs, and write some Arduino libs for the ones I have. Microbuilder have some good code, I think that could be a good starting point.

Hi bobcousins,

I just tried your Arduino rearrangment and copied it in the Arduino Folders.

But when I press "compile", I get the following error:

/home/.../arduino-1.5.7/hardware/OpenNxp/LPC8/cores/lpc810/arduino.c:12:21: fatal error: arduino.h: No such file or directory #include "arduino.h"

Where do I have to place the missing header files?

The file structure needs a correction to a path.

Change \hardware\OpenNxp\LPC8\

to

\hardware\OpenNxp\avr\

ChrisMicro: But when I press "compile", I get the following error:

/home/.../arduino-1.5.7/hardware/OpenNxp/LPC8/cores/lpc810/arduino.c:12:21: fatal error: arduino.h: No such file or directory #include "arduino.h"

Where do I have to place the missing header files?

Sorry, that's a problem with case-sensitive file names, in Windows I get lazy. In file "OpenNxp\LPC8\cores\lpc810\arduino.c", it should include "Arduino.h" not "arduino.h". I think that is the only place.

should include "Arduino.h" not "arduino.h". I OK, now it's compiling. If you want, you can setup the main repository in github. The question is, how can we get my existing library into it. The next two days I will probably be off, so I will answer later.