Open nkolban opened 8 years ago
A first pass at implementation has been provided. There is now a "Makefile" that is useful that is located in our project space at:
tools/Makefile
Contained within the Makefile are two rules:
If we execute make all
a local directory called build
is created, the content of the .c and .cpp files are compiled and the results placed in the build directory. Next the content (object files) are archived into a Dynamic Shared Library and a static library ... these are called:
Work is not yet complete on this work item as at this time, no testing has been performed and that will be next. There is also some discussion on separating the libraries into C and CPP versions. That has not been done yet as I am not understanding the need for that. I am certainly NOT saying that there isn't a need ... I merely want to appreciate it before moving to make those changes.
With the possibility of being able to build Arduino apps using the Arduino APIs without using the Arduino IDE, it is believed that one option is to create a library (possibly called libPiDuino.so) that contains the core plus libraries of the project. This could then be link edited with a sketch to produce an executable.
This issue asks for the design and development of such a library as part of the project. Presumably this will be the creation of a Makefile in some directory structure within the project which will not interfere with Arduino IDE operation. When run, the build will produce the desired libraries.
An example of an end-user session would be:
1) User creates a source file using vi (or some other editor) $ vi myProg.cpp
2) User compiles program on the Pi $ g++ myProg.cpp -lPiDuino
3) User runs the program $ sudo ./a.out
In order for the above to work, there must be a
libPiDuino.so
and that is currently the missing piece of the puzzle.