core-avr libraries are built into both static libraries and executables for testing. We use
make for compilation and linking.
gradle is also configured (but not required) for dependency resolution, code + project generation, and documentation.
make is configured to build to two cpu architectures:
avr. The former for local unit tests, the latter for Arduino projects.
- gradle (optional)
- doxygen (optional)
make configuration is contained in
properties.mk. Each subproject includes this file to configure both builds. This file is heavily documented with the specifics you'll need to adjust for your environment.
Building for Arduino
When writing an Arduino application, you can either directly include the source files, or link against static libraries.
avr-g++ requires detailed hardware knowledge to compile correctly (Arduino variant, cpu clock, cpu name), so you will need to configure the properties file if you wish to use static libraries.
Building for x86 + Testing
During development, we build x86 static libraries to the
/lib folder. We use
catch to write tests. This is why we make x86 object files-- so we can link these into a testable executable.
Note: This process currently requires a *nix shell for specific commands. For building on Windows, please see this guide for specific considerations.
We also include a number of
- build - Builds static libraries and test executables
- gendocs - Generates documentation using
doxygen. This is output in
- genapi - Generates a project archetype. Requires
-Papiproperty, eg -
gradle genapi -Papi=core-avr-ds.
- test - Runs all unit test executables.
You may also pass properties to
gradle using the
- verbose - Adds additional logging.