From 1ccbc03114504d3b4ba231a6af6eab48926d164f Mon Sep 17 00:00:00 2001 From: Simon John Date: Thu, 2 Jul 2015 14:37:28 +0100 Subject: [PATCH] Added examples for various boards and IDE versions to the Blink example. --- HISTORY.md | 1 + README.md | 3 +- examples/Blink/Makefile | 127 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 129 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index b0cb8fc..6f830d2 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -6,6 +6,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it ### In Development +- New: Add more board examples to Blink demo (https://github.com/sej7278) - New: Add option to split avrdude MCU from avr-gcc MCU (Issue #357) (https://github.com/hhgarnes) - New: Add support for /dev/tty.wchusbserial* (comes with cheap clones - DCCduino) (https://github.com/biesiad) - New: Add support for picocom as serial monitor(https://github.com/biesiad) diff --git a/README.md b/README.md index 4fe12c7..120d1da 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,8 @@ or you can install it using the [pre-built package installer](https://pypi.pytho You can also find more [detailed instructions in this guide](http://hardwarefun.com/tutorials/compiling-arduino-sketches-using-makefile). -You can also checkout the sample makefiles inside the `examples/` directory, e.g. [Makefile-example](examples/MakefileExample/Makefile-example.mk). +You can also checkout the sample makefiles inside the `examples/` directory, e.g. [Makefile-example](examples/MakefileExample/Makefile-example.mk) demonstrates some of the more advanced options, +whilst [Blink](examples/Blink/Makefile) demonstrates the minimal settings required for various boards like the Uno, Nano, Mega, Teensy, ATtiny etc. Download a copy of this repo some where in your system or install it through a package. diff --git a/examples/Blink/Makefile b/examples/Blink/Makefile index f9d5cf4..c26b797 100644 --- a/examples/Blink/Makefile +++ b/examples/Blink/Makefile @@ -1,5 +1,130 @@ # Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile BOARD_TAG = uno - include ../../Arduino.mk + + + +# --- leonardo (or pro micro w/leo bootloader) +#BOARD_TAG = leonardo +#MONITOR_PORT = /dev/ttyACM0 +#include /usr/share/arduino/Arduino.mk + +# --- mega2560 ide 1.0 +#BOARD_TAG = mega2560 +#ARDUINO_PORT = /dev/ttyACM0 +#include /usr/share/arduino/Arduino.mk + +# --- mega2560 ide 1.6 +#BOARD_TAG = mega +#BOARD_SUB = atmega2560 +#MONITOR_PORT = /dev/ttyACM0 +#ARDUINO_DIR = /where/you/installed/arduino-1.6.5 +#include /usr/share/arduino/Arduino.mk + +# --- nano ide 1.0 +#BOARD_TAG = nano328 +#MONITOR_PORT = /dev/ttyUSB0 +#include /usr/share/arduino/Arduino.mk + +# --- nano ide 1.6 +#BOARD_TAG = nano +#BOARD_SUB = atmega328 +#ARDUINO_DIR = /where/you/installed/arduino-1.6.5 +#include /usr/share/arduino/Arduino.mk + +# --- pro mini +#BOARD_TAG = pro5v328 +#MONITOR_PORT = /dev/ttyUSB0 +#include /usr/share/arduino/Arduino.mk + +# --- sparkfun pro micro +#BOARD_TAG = promicro16 +#ALTERNATE_CORE = promicro +#BOARDS_TXT = $(HOME)/arduino/hardware/promicro/boards.txt +#BOOTLOADER_PARENT = $(HOME)/arduino/hardware/promicro/bootloaders +#BOOTLOADER_PATH = caterina +#BOOTLOADER_FILE = Caterina-promicro16.hex +#ISP_PROG = usbasp +#AVRDUDE_OPTS = -v +#include /usr/share/arduino/Arduino.mk + +# --- chipkit +#BOARD_TAG = mega_pic32 +#MPIDE_DIR = /where/you/installed/mpide-0023-linux64-20130817-test +#include /usr/share/arduino/chipKIT.mk + +# --- pinoccio +#BOARD_TAG = pinoccio256 +#ALTERNATE_CORE = pinoccio +#BOOTLOADER_PARENT = $(HOME)/arduino/hardware/pinoccio/bootloaders +#BOOTLOADER_PATH = STK500RFR2/release_0.51 +#BOOTLOADER_FILE = boot_pinoccio.hex +#CFLAGS_STD = -std=gnu99 +#CXXFLAGS_STD = -std=gnu++11 +#include /usr/share/arduino/Arduino.mk + +# --- fio +#BOARD_TAG = fio +#include /usr/share/arduino/Arduino.mk + +# --- atmega-ng ide 1.6 +#BOARD_TAG = atmegang +#BOARD_SUB = atmega168 +#MONITOR_PORT = /dev/ttyACM0 +#ARDUINO_DIR = /where/you/installed/arduino-1.6.5 +#include /usr/share/arduino/Arduino.mk + +# --- arduino-tiny ide 1.0 +#ISP_PROG = usbasp +#BOARD_TAG = attiny85at8 +#ALTERNATE_CORE = tiny +#ARDUINO_VAR_PATH = $(HOME)/arduino/hardware/tiny/cores/tiny +#ARDUINO_CORE_PATH = $(HOME)/arduino/hardware/tiny/cores/tiny +#AVRDUDE_OPTS = -v +#include /usr/share/arduino/Arduino.mk + +# --- arduino-tiny ide 1.6 +#ISP_PROG = usbasp +#BOARD_TAG = attiny85at8 +#ALTERNATE_CORE = tiny +#ARDUINO_DIR = /where/you/installed/arduino-1.6.5 +#include /usr/share/arduino/Arduino.mk + +# --- damellis attiny ide 1.0 +#ISP_PROG = usbasp +#BOARD_TAG = attiny85 +#ALTERNATE_CORE = attiny-master +#AVRDUDE_OPTS = -v +#include /usr/share/arduino/Arduino.mk + +# --- damellis attiny ide 1.6 +#ISP_PROG = usbasp +#BOARD_TAG = attiny +#BOARD_SUB = attiny85 +#ALTERNATE_CORE = attiny +#F_CPU = 16000000L +#ARDUINO_DIR = /where/you/installed/arduino-1.6.5 +#include /usr/share/arduino/Arduino.mk + +# --- teensy3 +#BOARD_TAG = teensy31 +#ARDUINO_DIR = /where/you/installed/the/patched/teensy/arduino-1.0.6 +#include /usr/share/arduino/Teensy.mk + +# --- mighty 1284p +#BOARD_TAG = mighty_opt +#BOARDS_TXT = $(HOME)/arduino/hardware/mighty-1284p/boards.txt +#BOOTLOADER_PARENT = $(HOME)/arduino/hardware/mighty-1284p/bootloaders +#BOOTLOADER_PATH = optiboot +#BOOTLOADER_FILE = optiboot_atmega1284p.hex +#ISP_PROG = usbasp +#AVRDUDE_OPTS = -v +#include /usr/share/arduino/Arduino.mk + +# --- atmega328p on breadboard +#BOARD_TAG = atmega328bb +#ISP_PROG = usbasp +#AVRDUDE_OPTS = -v +#BOARDS_TXT = $(HOME)/arduino/hardware/breadboard/boards.txt +#include /usr/share/arduino/Arduino.mk