3 Replies Latest reply on Jan 28, 2016 9:18 AM by rob.woolley

    [SOLVED] Is C++ development supported on Rocket?




      I am trying to use Rocket on Galileo and make it work with an Adafruit 7-segment display which works over I2C. It has an associated Arduino library which Adafruit provides, written in C++. I am trying to make that library build on Rocket, planning to change the I2C interface routines to use the Rocket ones instead of the Arduino Wire library.


      This proves to be harder than expected, because the library is written in C++ and Kbuild (the build system behind the Rocket one) does not have explicit support for C++ files other than for host utilities. So far, I have added the following in my Makefile under the src/ directory:

      obj-y += Adafruit-GFX-Library/

      and I have the following in the library Makefile, under src/Adafruit-GFX-Library :

      hostprogs-y := Adafruit_GFX
      Adafruit_GFX-cxxobjs := Adafruit_GFX.o
      always := $(hostprogs-y)

      I see the build starts and I then stumble upon other issues (cf my other post about Arduino compatibility, I also had to rename the library source from .cpp to .cc).


      Is this the right approach? I fear I will hit a roadblock because the C++ Kbuild support is not meant to produce objects linkable into the image, rather host-supporting utilities. If so, what is the right way to do C++ development on Rocket ?


      Also, I guess that apart from building C++ formatted source files (like the Arduino libraries), does Rocket have a C++ runtime (exceptions, etc)?


      Thanks for your help!