LPC810 mini ARM Prozessor in 8 pin dip package

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.

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

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

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.

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.

It should be possible. The "Teensy" is ARM based and it manages to integrate itself.

ChrisMicro:

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.

I have now set up a github repo GitHub - bobc/OpenLasp: An Arduino support package for NXP LPC chips.

I'm not sure what you mean about your existing library, I've already incorporated it! I had to make a few changes, e.g. because an Arduino sketch is a C++ program. So you will probably want to keep your standalone LPC810 repo separate.

I'll get the upload tool working next.

Hi Bob,
wow ... in your GitHub repo I saw that you have been quite busy. You even have started the LPC11 part.
I just forked the repo and I will play around a little bit.
Do you have meanwhile some LPC810 hardware and could you test some code?

Greynomad wrote:

As for the Git stuff the "Organisation" sounds ok but as mentioned I have no idea about this stuff.
I know almost nothing about Git except that it's totally unintelligible, it's a miracle I got those files up at all smiley

What IDE or editor are you using? I started with a simple editor and a make file. And I tried the GIT command line. This was very complicated.
But later I began to use Eclipse. There is a plugin called EGit. With this it is really easy to use git. You just right click on the file

team -> commit

and than you can store your modifications.

I use the LPC Xpresso IDE, I gather that's based on Eclipse so maybe EGit will work with it.


Rob

I use the LPC Xpresso IDE

Hmm... I think that could work.
Using the LPC-Project is very simple. First you have to install EGit.

RightClick on the projects-explorer-window
-> import -> Git -> Projects from Git -> "Clone Button" on the right site
Than you can place

in the URI-Field. Than Eclipse should be able to download the repo.

Better is if you fork the project first in Git to your on GitHub account.

There is a simple Tutorial for EGit:

Hi Bob,

I tried to install OpenLasp like you described it:

Installation procedure:

Copy the Arduino/hardware folder to your sketches folder
Copy the OpenLaspExamples folder to your sketches folder
Restart Arduino IDE

But it didn't work as expected.
Instead I had to do the following:

copy
/OpenLasp/Arduino/hardware/OpenLasp/LPC8
to
/arduino-1.5.7/hardware/arduino/LPC8

Now the programmer file is missing:
java.io.IOException: Cannot run program "/home/christoph/arduino-1.5.7/hardware/arduino/tools/lpc_upload.sh": java.io.IOException: error=2, Datei oder Verzeichnis nicht gefunden

LPC1114 version: I don't have LPC8xx yet but I do have several LPC11xx boards so I though I would have a go at it. I wanted try the "variant" support. It proved a little more tricky, the IDE does not automatically build the required library, it has to be pre-built with makefile and put into source tree. Possibly there is a better way to do it, I might make some inquiries on dev list.

There is a git gui (command "git gui" or "gitk") which runs on Linux and Windows. There are a few things I do on the command line still but generally I use the GUI for most regular operations, commit, push. The GUI is not totally slick as it could be, but generally OK. I would love to have a simpler/better version. Github have a windows client, but I don't use it.

ChrisMicro:
I tried to install OpenLasp like you described it:

Installation procedure:

Copy the Arduino/hardware folder to your sketches folder
Copy the OpenLaspExamples folder to your sketches folder
Restart Arduino IDE

But it didn't work as expected.

In what way did it not work? I just tried it on Linux, and it worked the way I expected. There are some changes needed to the lpc_upload.sh script, I hadn't quite finished that.

To be clear, there is an Arduino "install" folder, and a "user" sketch folder. OpenLasp was designed to be installed into the user folder.

The paths will be different if you install elsewhere, and it may/may not work. It seems from your later message that it compiles but doesn't find the right tools folder.

I made a couple of assumptions, 1) it is better to install into user folder rather than patching the Arduino install,
2) an installer is not required, as it is a simple folder copy

I could be wrong about both of those things!

  1. an installer is not required, as it is a simple folder copy
    I like simplicity, so I think it is ok to install the whole thing in the user folder.
    But on my system it didn't work so I copied the things into the correct "install" folders. Probably it is a issue of the Arduino IDE version: I have 1.5.7 32bit on Ubuntu.

There is another issue. The bash script for the programmer didn't work:

and it is necessary to set the "execution bits" of the files.

Now I tried a second time the installation you described: It worked. So thats OK.
I also saw that you pulled the batch file modification.

Meanwhile back at the IDE, I installed the latest version (7.3.0) and have spent half the day getting my previous projects to compile.

Did I mention that I hate dicking with tool chains? :slight_smile:

Anyway all seems to work now.

I have installed EGit and tried to grab the repo but it asked me too many damn questions and by that time I'd had a gut full.


Rob

Hey this topic looks very interesting. I've written a Simon Says game for the LPC810 under the LPCXpresso IDE and I'm very curious to port my code to the Arduino IDE.

I've written a Simon Says game
Hi hwhardsoft,
I saw your program before. It is quite nice. Because I was looking for some way to produce sound, I found your project.
If you want it should be easy to write your code arduino compatible.
There is a sound function
OpenLasp/example05_toneMelody.ino at master · bobc/OpenLasp · GitHub

And the Button functions are working also:

At the moment I'm experimenting with some none square wave sounds: