There is no clear reason why this should be configurable and causes an abstraction of USEMODULE.
The true reason is to make Kconfig easier but it seems having a variable in USEMODULE is a bit strange.
To make it possible to use an Arduino library, a new pseudomodule arduino_lib is introduced. This pseudomodule enables implicitly module arduino but avoids that a sketch is required or generated and compiled. Thus, it is possible to compile and use a package or directory with some source files from an Arduino library in RIOT applications.
Arduino is always enabling C++11 support, so sketches and libs are depending on
it. Every C++ compiler has been enabling C++11 by default for some years now.
Still, Ubuntu's avr-gcc is so **horrible** out of date, that it is not enabled
there. As a simple work around, -std=c++11 is now passed to the C++ compiler if
Arduino is used.
Arduino libraries often include Arduino.h. For source code compatibility this header file is required. Header guards in file arduino.hpp had to be renamed.
This is quick solution to avoid wrapping around after 4294967 milliseconds.
It uses xtimer_now_usec64 instead of xtimer_now_usec.
Notice that this is more expansive than the previous solution, especially
on AVR systems.
llvm-ar behaves weidly when creating thin archive. This only manifests
itself when using arduino sketches as these are built from the "bin"
directory.
Specifically, given a directory "m" and an object in "m/obj.o " an
invocation with CWD==m:
```
llvm-ar rcTs ../m.a obj.o
```
Will create a maformed archive. Binutils does not have any issue with this.
The following command, executed with CWD==m/.. works:
```
llvm-ar rcTs m.a m/obj.o
```
The trick used in this commit is to put the source files in a different
directory than the object files and compile from there.
- Serial.print() and Serial.println() have been extended to support:
- unsigned int
- long
- unsigned long
- The SerialFormat BIN has been implemented
- Serial.println(void) has been added
Generate a module for arduino sketches in a subfolder of BINDIR.
This prevents issues when doing concurrent builds or out of tree build with
readonly sources.
Declare all generated files as `BUILDDEPS` to be re-created after
`clean` on parrallel `clean all`.