Introduction
This all started with the re-wiring of a 1982 Mexican Volkswagen Beetle, many years ago. The result of that project was a mess. The car functioned, but in terms of an elegant solution to the wiring problem it certainly wasn't that. Fast forward and another project vehicle and another re-wiring problem. The problem space has changed very little over the years, but my proposed solution to the problem has to be an improvement on past attempts. That's when I discovered CAN Bus and what appears to be the obvious solution to the problem, (time will tell).
The Hardware
Given my discovery of CAN Bus protocols what I now needed was a simple micro-controller based board, like the Arduino, which talked CAN Bus and to which I could attach the necessary expansion boards to drive the various 12V electronics of the project vehicle. My search at the time didn't result in a satisfactory answer to my requirements. There were CAN Bus expansion shields for the Arduino family of boards, but once married to the Arduino the shield tied up the expansion slot and further 12V automotive electronics would be difficult to add. I could have created my own Arduino expansion shields, which each had a CAN Bus interface as well as 12V electronics, but that didn't appear to be the best solution. The obvious answer, to me, was to create my own micro-controller board which included all the CAN Bus, and higher level management protocols to which various expansion boards could then be added. The result is the cinnamonBun:

Ultimately this device will be Open Hardware but I'm hoping to get it into a vehicle, to test it to some extent before doing so. I'm hoping to catch any obvious, and potentially embarrassing, school boy errors before opening myself up to ridicule ;-) once tested I'll be happier to Open the device as a beta version and who knows perhaps sell a few, to pay some bills.
The Software
The problem space does not simply require Hardware but the Software that simplifies the solutions to distributed control problems. Ultimately the aim is to have an underlying Software Architecture which allows a simple Application code architecture, much like the Arduino, where developers have to create just two functions, one to initialise the CAN Bus Node and the other to add processing to the CAN Node's main even loop. There are three levels to this SW Architecture:
libesoup
At the lowest level is an Open Source LGPL licensed library of code which offers a simplified interface to the Hardware features of both the Microchip dsPIC33EP256MU806 based cinnamonBun, and the features of the cinnamonBun itself. Currently the library includes Hardware timers, UARTs, SPI, OneWire etc. etc. but more functionality will have to be added as more problems are tackled. At the time of writing, for example, I have still to tackle Analog inputs. This library of code libesoup is already Open to public scrutiny on github.
ES_CAN_Node
On top of the low level libesoup library is the code which manages the CAN Node. This code manages the protocols and the housekeeping associated with managing a node on the CAN Bus network. I'm reluctant to use the term OS because, whilst the code does manage lower level functions, so that higher layers can ignore the details, it is intended to be as small as possible, as it's intended target is a micro-controller. There will be no thread scheduling or memory management, those features aren't, at present, required to solve the problem being solved.
The CAN Node management software is Open and licensed under the GPL and can be obtained from github. If libesoup is a work...
Read more »