Arduino Makefile

The Arduino-Makefile project frees you from the Arduino IDE, while still being able to use the library. You can find it in the 'avrpi-tools/src/arduino-mk' directory.

The 'projects' directory contains examples of possible things you might want to do such as using default Arduino libraries, your own custom libraries, external c files or bypassing the Arduino library completely.

To edit .ino files in your favorite text editor with syntax highlighting, simply change the file extension .ino to .cpp and add an '#include <Arduino.h>' at the top of the file.

In the file, edit BOARD_TAG to one of the following:

BOARD_TAG = avrpi328_8     # AVRPi-328 ATmega328 @ 8 MHz
BOARD_TAG = avrpi328_12    # AVRPi-328 ATmega328 @ 12 MHz
BOARD_TAG = avrpi328_16    # AVRPi-328 ATmega328 @ 16 MHz
BOARD_TAG = avrpi32u4_8    # AVRPi-32U4 ATmega32U4 @ 8 MHz
BOARD_TAG = avrpi32u4_8cat # AVRPi-32U4 ATmega32U4 @ 8 MHz Caterina bootloader
BOARD_TAG = gert168        # Gertboard ATmega168 @ 12 MHz
BOARD_TAG = gert328        # Gertboard ATmega328 @ 12 MHz
BOARD_TAG = gertduino48    # Gertduino ATmega48 @ 8 MHz
BOARD_TAG = gertduino328   # Gertduino ATmega328 @ 16 MHz
BOARD_TAG = raspioduino    # RasPiO Duino ATmega328 @ 12 MHz

These are the ones added to the Arduino 'boards.txt' file by the setup script. Add extra make variables to or a project Makefile if you need to (type 'make help_vars').

To compile and upload to the AVRPi-board:

make ispload