AVR++
AVR++ is a C++17 interface to Atmel AVR 8-bit microcontrollers. The goal of AVR++ is to provide a safe, clean, and zero-overhead interface to work with with AVR microcontrollers while still allowing for great flexibility and customizability.
Setup
This chapter describes how to setup AVR++ for use in modern AVR projects. It explains how to install the dependencies of AVR++ on different operating systems and the requirement for building the library documentation
Library Dependencies
AVR++ is a header-only library with minimal dependencies on external libraries. It is designed to be as self-contained as possible.
Dependency | Version | Required By/For |
---|---|---|
AVR GCC | >=7.1 | Compilation |
AVR libc | >=2.0 | Current Implementation |
AVR binutils | >=2.29 | Firmware hex-files / Disassembly / Analysis |
Installation on Arch Linux
Arch Linux provides all of the requirements in the default community package repository. You can install all of them using the following command:
$ sudo pacman -S --needed avr-gcc avr-libc
Please note that AVR binutils will be installed as a dependency of the avr-gcc package.
Using the Library
Since AVR++ is a header-only library, you can simply copy the contents of the include folder into your own project and start using it. Alternatively, AVR++ is also availabe as a Conan Package.
Building the Documentation
AVR++ features an extensive documentation based on Sphinx. You can find the documentation online on Read the Docs or build it yourself.
Build Requirements
AVR++ provides a pipenv Pipfile. You can use this file to install Sphinx, Breathe, and the Sphix Read the Docs theme. In addition to a basic Sphinx setup, you will also need a reasonably modern version of Doxygen. A clean way to manage the Python dependencies is to use pipenv isolated Python environment.
To install the required Python packages, simply run the following command on Linux from the source root of the project:
$ pipenv install
After successfully installing the require Python packages, you can build the documentation using either the following command from the doc directory:
$ pipenv run make doc html
you can specify different output formats by simply replacing html by your desired output format, for example man, epub, or pdf.