|
FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
FastArduino currently supports a certain number of AVR MCU and Arduino boards based on these.
Since each MCU has its specificities, FastArduino defines distinct header files to ensure compile-time checking works fine for the current selected target.
MCU selection at compile-time is done by setting the following pre-processor macros in the command-line of the compiler:
VARIANT which can be one of:ARDUINO_UNOARDUINO_NANOARDUINO_LEONARDOBREADBOARD_ATMEGA328PBREADBOARD_ATMEGAXX4BREADBOARD_ATTINYX4BREADBOARD_ATTINYX5ARDUINO_MEGAF_CPUIn addition, the following option shall be set at compile time:
-mmcu=<MCU> where <MCU> is the code of the target MCU as understood by the AVR build toolchain:atmega328atmega32u4atmega164atmega324atmega644atmega1284attiny84attiny85atmega2560When using FastArduino makefile, then you first need to create your project under netbeans, generate a proper configuration for it, and pass it to make. This is described in further details in ArduinoDevSetup.
Note that you should never include directly a specific board header file (e.g. #include <fastarduno/boards/uno.h>) in your own source code, this will not compile properly. Instead, you should simply #include <fastarduino/boards/board.h> which will include the proper header file for the board defined by VARIANT.
For each of the following supported targets, you can find the documentation of its specific header file:
Then all standard FastArduino API works on each target and shares this common documentation.
FastArduino may be added support for other AVR-based targets that share features similar to other AVR MCU: digital IO, PWM, analog inputs, timers, watchdog...
Adding support to a new target MCU or a new specific board embedding a supported MCU is rather easy thanks to FastArduino approach to board configuration, based on "traits".
This is further described later (TODO).