BBB PROGRAMMING in C++ ???

Hi Jason .....

I have been using Ti chips since 1967! I want to apply your great invention to my most recent project:
http://adsabs.harvard.edu/abs/2008cosp...37..208B

At present I have your BBB running with Eclipse C/C++ CDT with C++11 working very well, but only as blocking synchronous operation. Furthermore, Arduino-like functions like attachInterrupt and other asynchronous event-driven functions are not available.

Since you wrote bonescript, with all due respect to javascript, there are many of us who, for obvious reasons, would like to do away with javascript and v8 while making direct use of libuv through a C++ interface that implements your bonescript functions. The closest I could find is:
GitHub - d5/node.native: C++11 port for the Node: native performance and modern simplicity.
Please see file_test.cpp.

I am sure you must have thought of us. Do you have something in your personal toolbox already that could help me get started? Or perhaps one of your engineers could look at adding bonescript-like functionality into node.native ??

A good place to start is http://elinux.org/Userspace_Arduino. It is a C++ library and I would want to add dependencies within BoneScript on it as functions are suitable. This is the C++ project I plan to track/support the most.

It is synchronous and that is a problem for what it sounds like you want to do as well as for my use in BoneScript. I suggest working with the current developers to scope out adding some libuv/asynchronous support. I will look at keeping longer term maintainers.

Hopefully you can start with the synchronous version, especially if Arduino-like is what you want.

Overall, I believe C++ would make the BBB even more attractive to a much wider community. What are your thoughts?

C++ is already supported by Linux in general, though I can see a use in putting an API on top for userspace apps. Efforts like libsoc seem targeted at exactly this, but are rather early.

Saving a bit of the best for last, you should also check out Wiring++. I think most of these efforts will end up feeding into that project where things will get architected cleanly. I suggest you look at the proposal and bring in asynchronous ideas there.

I’m afraid attachInterrupt() is one of the few functions that have not been implemented (yet) in the Userspace-Arduino libraries. The kernel does provide an event-driven access to the GPIOs (via gpio-keys) but one still has to check for events in /dev/input/event1. At least, that’s the way I understand it.