diff -Nru arduino-mk-1.3.0/Arduino.mk arduino-mk-1.3.1/Arduino.mk --- arduino-mk-1.3.0/Arduino.mk 2014-01-29 06:23:26.000000000 +0000 +++ arduino-mk-1.3.1/Arduino.mk 2014-02-04 12:59:18.000000000 +0000 @@ -4,7 +4,7 @@ # System part (i.e. project independent) # # Copyright (C) 2012 Sudar , based on -# - M J Oldfield work: https://github.com/mjoldfield/Arduino-Makefile +# M J Oldfield work: https://github.com/mjoldfield/Arduino-Makefile # # Copyright (C) 2010,2011,2012 Martin Oldfield , based on # work that is copyright Nicholas Zambetti, David A. Mellis & Hernando @@ -19,7 +19,7 @@ # # Original Arduino adaptation by mellis, eighthave, oli.keller # -# Current version: 1.3.0 +# Current version: 1.3.1 # # Refer to HISTORY.md file for complete history of changes # @@ -53,7 +53,7 @@ # On Linux, you might prefer: # # ARDUINO_DIR = /usr/share/arduino -# ARDMK_DIR = /usr +# ARDMK_DIR = /usr/share/arduino # AVR_TOOLS_DIR = /usr # # You can either set these up in the Makefile, or put them in your @@ -185,9 +185,9 @@ # ALTERNATE_CORE, assuming your core is in your ~/sketchbook/hardware # directory. For example: # -# ISP_PORT = /dev/ttyACM0 -# BOARD_TAG = attiny85 -# ALTERNATE_CORE = attiny-master +# ISP_PORT = /dev/ttyACM0 +# BOARD_TAG = attiny85 +# ALTERNATE_CORE = attiny-master # # To use the more complex arduino-tiny and TinyCore2 cores, you must # also set ARDUINO_CORE_PATH and ARDUINO_VAR_PATH to the core @@ -354,7 +354,7 @@ ifndef AVR_TOOLS_DIR - BUNDLED_AVR_TOOLS_DIR ?= $(call dir_if_exists,$(ARDUINO_DIR)/hardware/tools/avr) + BUNDLED_AVR_TOOLS_DIR := $(call dir_if_exists,$(ARDUINO_DIR)/hardware/tools/avr) ifdef BUNDLED_AVR_TOOLS_DIR AVR_TOOLS_DIR = $(BUNDLED_AVR_TOOLS_DIR) @@ -1184,7 +1184,7 @@ $(call avr_size,$(TARGET_ELF),$(TARGET_HEX)) show_boards: - @cat $(BOARDS_TXT) | grep -E "^[[:alnum:]]" | cut -d . -f 1 | uniq + @$(CAT) $(BOARDS_TXT) | grep -E "^[[:alnum:]]" | cut -d . -f 1 | uniq monitor: $(MONITOR_CMD) $(call get_monitor_port) $(MONITOR_BAUDRATE) @@ -1208,6 +1208,9 @@ generated_assembly: generate_assembly @$(ECHO) "\"generated_assembly\" target is deprecated. Use \"generate_assembly\" target instead" +help_vars: + @$(CAT) $(ARDMK_DIR)/arduino-mk-vars.md + help: @$(ECHO) "\nAvailable targets:\n\ make - no upload\n\ @@ -1229,6 +1232,7 @@ make raw_eeprom - upload the eep file without first resetting\n\ make burn_bootloader - burn bootloader and fuses\n\ make set_fuses - set fuses without burning bootloader\n\ + make help_vars - print all variables that can be overridden\n\ make help - show this help\n\ " @$(ECHO) "Please refer to $(ARDMK_DIR)/Arduino.mk for more details.\n" diff -Nru arduino-mk-1.3.0/CONTRIBUTING.md arduino-mk-1.3.1/CONTRIBUTING.md --- arduino-mk-1.3.0/CONTRIBUTING.md 2014-01-29 06:23:26.000000000 +0000 +++ arduino-mk-1.3.1/CONTRIBUTING.md 2014-02-04 12:59:18.000000000 +0000 @@ -1,6 +1,6 @@ # Contributing To Arduino Makefile -Community made patches, localisations, bug reports, documentation and contributions are always welcome and are crucial to the success of this project. +Community made patches, localizations, bug reports, documentation and contributions are always welcome and are crucial to the success of this project. When contributing please ensure you follow the guidelines below so that we can keep on top of things. @@ -20,6 +20,7 @@ - Fork the repository on GitHub - Make the changes to your forked repository - Update the [changelog file](HISTORY.md) and add a note about your change. If possible prefix it with either Fix, Tweak or New +- If you are adding or changing the behavior of any variable, then update the corresponding documentation in the [arduino-mk-vars.md](arduino-mk-vars.md) file as well - When committing, reference your issue (if present) and include a note about the fix - If possible (and if makes sense) do atomic commits - Try to follow [this guideline](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) while choosing the git commit message diff -Nru arduino-mk-1.3.0/HISTORY.md arduino-mk-1.3.1/HISTORY.md --- arduino-mk-1.3.0/HISTORY.md 2014-01-29 06:23:26.000000000 +0000 +++ arduino-mk-1.3.1/HISTORY.md 2014-02-04 12:59:18.000000000 +0000 @@ -4,6 +4,11 @@ The following is the rough list of changes that went into different versions. I tried to give credit whenever possible. If I have missed anyone, kindly add it to the list. +### 1.3.1 (2014-02-04) +- Fix: BUNDLED_AVR_TOOLS_DIR is now set properly when using only arduino-core and not the whole arduino package. (https://github.com/sej7278) +- New: Document all variables that can be overridden. (https://github.com/sej7278) +- New: Add a new `help_vars` target to display information about variables that can be overridden. + ### 1.3.0 (2014-01-29) - Fix: Use more reliable serial device naming in Windows. Fix issue #139 and #155 (https://github.com/peplin) - Fix: Document that ARDUINO_DIR must be a relative path in Windows. Fix issue #156 (https://github.com/peplin) diff -Nru arduino-mk-1.3.0/README.md arduino-mk-1.3.1/README.md --- arduino-mk-1.3.0/README.md 2014-01-29 06:23:26.000000000 +0000 +++ arduino-mk-1.3.1/README.md 2014-02-04 12:59:18.000000000 +0000 @@ -5,6 +5,7 @@ ## Features - Very robust +- Highly customizable - Supports all official AVR-based Arduino boards - Supports chipKIT - Works on all three major OS (Mac, Linux, Windows) @@ -91,6 +92,8 @@ - `ARDMK_DIR` - Path where the `*.mk` are present. If you installed the package, then it is usually `/usr/share/arduino` - `AVR_TOOLS_DIR` - Path where the avr tools chain binaries are present. If you are going to use the binaries that came with Arduino installation, then you don't have to set it. +The list of all variables that can be overridden is available at [arduino-mk-vars.md](arduino-mk-vars.md) file. + ## Including Libraries You can specify space separated list of libraries that are needed for your sketch to the variable `ARDUINO_LIBS`. @@ -119,7 +122,7 @@ ## Versioning -The current version of the makefile is `1.3.0`. You can find the full history in the [HISTORY.md](HISTORY.md) file +The current version of the makefile is `1.3.1`. You can find the full history in the [HISTORY.md](HISTORY.md) file This project adheres to Semantic [Versioning 2.0](http://semver.org/). diff -Nru arduino-mk-1.3.0/arduino-mk-vars.md arduino-mk-1.3.1/arduino-mk-vars.md --- arduino-mk-1.3.0/arduino-mk-vars.md 1970-01-01 00:00:00.000000000 +0000 +++ arduino-mk-1.3.1/arduino-mk-vars.md 2014-02-04 12:59:18.000000000 +0000 @@ -0,0 +1,510 @@ +# Documentation of variables + +The following are the different variables that can be overwritten in the user makefiles. + +- [Global variables](#global-variables) +- [Installation/Directory variables](#installationdirectory-variables) +- [Arduino IDE variables](#arduino-ide-variables) +- [Sketch related variables](#sketch-related-variables) +- [ISP programming variables](#isp-programming-variables) +- [Compiler/Executable variables](#compilerexecutable-variables) +- [Avrdude setting variables](#avrdude-setting-variables) +- [Bootloader variables](#bootloader-variables) +- [ChipKIT variables](#chipkit-variables) + +## Global variables + +### ARDUINO_QUIET +Suppress printing of Arduino-Makefile configuration. + +Defaults to unset/disabled. + +*Example*: 1 + +Optional. + +## Installation/Directory variables + +### ARDMK_DIR +Directory where the `*.mk` files are stored. + +Usually can be auto-detected as `AUTO_ARDUINO_DIR` (parent of Arduino.mk). + +*Example*: /usr/share/arduino + +Optional. + +### AVR_TOOLS_DIR +Directory where tools such as avrdude, avr-g++, avr-gcc etc. are stored in the bin/ subdirectory. + +Usually can be auto-detected from `$PATH` as `SYSTEMPATH_AVR_TOOLS_DIR` or as `BUNDLED_AVR_TOOLS_DIR` within the Arduino distribution. + +*Example*: /usr or /usr/share/arduino/hardware/tools/avr + +Optional. + +### RESET_CMD +Command to reset the MCU. + +Defaults to ard-reset-arduino with the extra --caterina flag for atmega32u4 boards. + +*Example*: ~/gertduino/reset + +Optional. + +## Arduino IDE variables + +### ARDUINO_DIR +Directory where the Arduino IDE and/or core files are stored. + +*Example*: /usr/share/arduino (Linux) or /Applications/Arduino.app/Contents/Resources/Java (OSX) + +Optional. + +### ARDUINO_VERSION +Version string for Arduino IDE and/or core. + +Usually can be auto-detected as `AUTO_ARDUINO_VERSION` from /usr/share/arduino/lib/version.txt + +*Example*: 105 + +Optional. + +### ARDUINO_SKETCHBOOK +Path to sketchbook directory. + +Usually can be auto-detected from the Arduino preferences.txt file or the default ~/sketchbook + +*Example*: ~/sketches + +Optional. + +### ARDUINO_PREFERENCES_PATH +Path to Arduino preferences.txt file. + +Usually can be auto-detected as `AUTO_ARDUINO_PREFERENCES` from the defaults ~/.arduino/preferences.txt (Linux) or ~/Library/Arduino/preferences.txt (OSX) + +*Example*: ~/sketches/preferences.txt + +Optional. + +### ARDUINO_CORE_PATH +Path to standard Arduino core files. + +*Example*: /usr/share/arduino/hardware/arduino/cores/arduino + +Optional. + +## Sketch related variables + +### ARDUINO_LIBS +Any libraries you intend to include. + +Usually can be auto-detected from the sketch. Separated by spaces. If the library has a /utility folder (like SD or Wire library), then the utility folder should also be specified. + +*Example*: SD SD/utility Wire Wire/utility + +Optional. + +### BOARD_TAG +Device type as listed in boards.txt or `make show_boards`. + +*Example*: uno or mega2560 + +Mandatory. + +### MONITOR_PORT +Path to serial (USB) device used for uploading/serial comms. + +*Example*: /dev/ttyUSB0 or /dev/ttyACM0 (Linux) or /dev/cu.usb* (OSX) or com3 (Windows) + +Mandatory. + +### USER_LIB_PATH +Directory where additional libraries are stored. + +Defaults to 'libraries' directory within user's sketchbook. + +*Example*: ~/sketchbook/libraries (Linux) + +Optional. + +### ALTERNATE_CORE +Non-standard core for Arduino-unsupported chips like the ATtiny. + +*Example*: attiny-master or arduino-tiny or tiny2 + +Optional. + +### ARDUINO_VAR_PATH +Path to non-standard core's variant files. + +*Example*: ~/sketchbook/hardware/arduino-tiny/cores/tiny + +Optional. + +### VARIANT +Variant of a standard board design. + +Usually can be auto-detected as build.variant from boards.txt + +*Example*: leonardo + +Optional. + +### USB_VID +Override USB VID for atmega32u4 boards. + +Usually can be auto-detected as build.vid from boards.txt + +*Example*: 0x2341 + +Optional. + +### USB_PID +Override USB PID for atmega32u4 boards. + +Usually can be auto-detected as build.pid from boards.txt + +*Example*: 0x8039 + +Optional. + +### F_CPU +CPU speed in Hz + +Usually can be auto-detected as build.f_cpu from boards.txt + +*Example*: 8000000L + +Optional. + +### HEX_MAXIMUM_SIZE +Maximum hex file size + +Usually can be auto-detected as upload.maximum_size from boards.txt + +*Example*: 14336 + +Optional. + +### MCU +Microcontroller model. + +Usually can be auto-detected as build.mcu from boards.txt + +*Example*: atmega32u4 + +Optional. + +### MCU_FLAG_NAME +Override default MCU flags. + +Defaults to mmcu + +*Example*: mprocessor + +Optional. + +### MONITOR_BAUDRATE +Baudrate of the serial monitor. + +Defaults to 9600 if it can't find it in the sketch Serial.begin() + +*Example*: 57600 + +Optional. + +## ISP programming variables + +### ISP_PROG +Type of ISP. Either a USB device or ArduinoISP protocol. + +*Example*: usbasp or usbtiny or stk500v2 or stk500v1 + +Optional. + +### ISP_PORT +Device path to ArduinoISP. Not needed for hardware ISP's. + +*Example*: /dev/ttyACM0 (Linux) + +Optional. + +### ISP_LOCK_FUSE_PRE +Bootloader unlock bits. + +Usually can be auto-detected from boards.txt + +*Example*: 0x3f + +Optional. + +### ISP_LOCK_FUSE_POST +Bootloader lock bits. + +Usually can be auto-detected from boards.txt + +*Example*: 0xcf + +Optional. + +### ISP_HIGH_FUSE +SP_LOW_FUSE/ISP_EXT_FUSE - high/low/extended fuse bits. + +Usually can be auto-detected from boards.txt + +*Example*: 0xdf or 0xff or 0x01 + +Optional. + +### ISP_EEPROM +Whether to upload the EEPROM file or not. + +Defaults to 0 + +*Example*: 1 + +Optional. + +## Compiler/Executable variables + +### CC_NAME +C compiler. + +Defaults to avr-gcc + +*Example*: pic32-gcc + +Optional. + +### CXX_NAME +C++ compiler. + +Defaults to avr-g++ + +*Example*: pic32-g++ + +Optional. + +### OBJCOPY_NAME +Objcopy utility. + +Defaults to avr-objcopy + +*Example*: pic32-objcopy + +Optional. + +### OBJDUMP_NAME +Objdump utility. + +Defaults to avr-objdump + +*Example*: pic32-objdump + +Optional. + +### AR_NAME +Archive utility. + +Defaults to avr-ar + +*Example*: pic32-ar + +Optional. + +### SIZE_NAME +Size utility. + +Defaults to avr-size + +*Example*: pic32-size + +Optional. + +### NM_NAME +Nm utility. + +Defaults to avr-nm + +*Example*: pic32-nm + +Optional. + +### OPTIMIZATION_LEVEL +Linker's -O flag + +Defaults to s, which shouldn't really be changed as it breaks SoftwareSerial and usually results in bigger hex files. + +*Example*: 3 + +Optional. + +### CFLAGS_STD +Flags to pass to the C compiler. + +Defaults to -std=gnu99 + +*Example*: + +Optional. + +### OVERRIDE_EXECUTABLES +Override the default build tools. + +If set to 1 each tool (CC, CXX, AS, OBJCOPY, OBJDUMP, AR, SIZE, NM) must have its path explicitly defined. See chipKIT.mk + +*Example*: 1 + +Optional. + +### MONITOR_CMD +Command to run the serial monitor. + +Defaults to screen + +*Example*: minicom + +Optional. + +## Avrdude setting variables + +### AVRDUDE +Path to avrdude utility + +Usually can be auto-detected within the parent of `AVR_TOOLS_DIR` or in the $PATH + +*Example*: /usr/bin/avrdude + +Optional. + +### AVRDUDE_CONF +Path to avrdude.conf file + +Usually can be auto-detected within the parent of `AVR_TOOLS_DIR` + +*Example*: /etc/avrdude.conf or /usr/share/arduino/hardware/tools/avrdude.conf + +Optional. + +### AVR_TOOLS_PATH +Directory where tools such as avrdude, avr-g++, avr-gcc etc. are stored. + +Usually can be auto-detected from AVR_TOOLS_DIR/bin + +*Example*: /usr/bin or /usr/share/arduino/hardware/tools/avr/bin + +Optional. + +### ARDUINO_LIB_PATH +Directory where the standard Arduino libraries are stored. + +Defaults to ARDUINO_DIR/libraries + +*Example*: /usr/share/arduino/libraries (Linux) + +Optional. + +### ARDUINO_CORE_PATH +Directory where the standard Arduino cores are stored. + +Defaults to ARDUINO_DIR/hardware/arduino/cores/arduino + +*Example*: /usr/share/arduino/hardware/arduino/cores/robot + +Optional. + +### ALTERNATE_CORE_PATH +Path to non-standard cores. + +Defaults to ARDUINO_SKETCHBOOK/hardware/ALTERNATE_CORE + +*Example*: ~/sketchbook/hardware/arduino-tiny/cores/tiny + +Optional. + +### BOARDS_TXT +Path to boards.txt + +Defaults to ARDUINO_DIR/hardware/arduino/boards.txt + +*Example*: ~/sketchbook/hardware/boards.txt or /usr/share/arduino/hardware/arduino/boards.txt (Linux) + +Optional. + +### AVRDUDE_ARD_BAUDRATE +Upload speed + +Usually can be auto-detected as upload.speed from boards.txt + +*Example*: 19200 + +Optional. + +### AVRDUDE_ARD_PROGRAMMER +Upload protocol + +Usually can be auto-detected as upload.protocol from boards.txt + +*Example*: stk500v1 + +Optional. + +### AVRDUDE_ISP_BAUDRATE +ISP speed if different to upload.speed + +Defaults to same as `AVRDUDE_ARD_BAUDRATE` or 19200 + +*Example*: 19200 + +Optional. + +### AVRDUDE_OPTS +Options to pass to avrdude. + +Defaults to '-q -V -D' (quiet, don't verify, don't auto-erase). User values are not ANDed to the defaults, you have to set each option you require. + +*Example*: -v + +Optional. + +## Bootloader variables + +### BOOTLOADER_FILE +File for bootloader. + +Usually can be auto-detected as bootloader.file from boards.txt + +*Example*: optiboot_atmega328.hex + +Optional. + +### BOOTLOADER_PATH +Path to bootloader file. + +Usually can be auto-detected as a relative bootloader.path from boards.txt + +*Example*: optiboot or arduino:atmega or /usr/share/arduino/hardware/arduino/bootloaders/caterina/Caterina-Esplora.hex + +Optional. + +## ChipKIT variables + +### MPIDE_DIR +Path to chipKIT MP IDE + +Usually can be auto-detected as `AUTO_MPIDE_DIR` from the defaults /usr/share/mpide (Linux) or /Applications/Mpide.app/Contents/Resources/Java (OSX) + +*Example*: ~/mpide + +Optional. + +### MPIDE_PREFERENCES_PATH +Path to chipKIT preferences.txt file. + +Usually can be auto-detected as `AUTO_MPIDE_PREFERENCES_PATH` from the defaults ~/.mpide/preferences.txt (Linux) or ~/Library/Mpide/preferences.txt (OSX) + +*Example*: ~/chipkit/preferences.txt + +Optional. diff -Nru arduino-mk-1.3.0/debian/arduino-mk.install arduino-mk-1.3.1/debian/arduino-mk.install --- arduino-mk-1.3.0/debian/arduino-mk.install 2014-01-29 09:18:44.000000000 +0000 +++ arduino-mk-1.3.1/debian/arduino-mk.install 2014-02-04 16:34:35.000000000 +0000 @@ -1,2 +1,2 @@ -*.mk usr/share/arduino +*.mk arduino-mk-vars.md usr/share/arduino bin usr diff -Nru arduino-mk-1.3.0/debian/changelog arduino-mk-1.3.1/debian/changelog --- arduino-mk-1.3.0/debian/changelog 2014-01-29 09:21:52.000000000 +0000 +++ arduino-mk-1.3.1/debian/changelog 2014-02-04 16:35:21.000000000 +0000 @@ -1,3 +1,13 @@ +arduino-mk (1.3.1-1) unstable; urgency=medium + + * New upstream release + - Fixes BUNDLED_AVR_TOOLS_DIR not being set correctly when using + the arduino-core package instead of the whole arduino IDE. + - Added "make help_vars" to display information abou the variables + that can be overridden (so updated arduino-mk.install) + + -- Simon John Tue, 04 Feb 2014 16:24:00 +0000 + arduino-mk (1.3.0-1) unstable; urgency=medium * New upstream release diff -Nru arduino-mk-1.3.0/packaging/fedora/README.md arduino-mk-1.3.1/packaging/fedora/README.md --- arduino-mk-1.3.0/packaging/fedora/README.md 2014-01-29 06:23:26.000000000 +0000 +++ arduino-mk-1.3.1/packaging/fedora/README.md 2014-02-04 12:59:18.000000000 +0000 @@ -6,7 +6,7 @@ From the top-level Arduino-Makefile directory you've checked out of github, run the following (as unprivileged user) to create a compressed tarball using the naming conventions required by rpmbuild: - git archive HEAD --prefix=arduino-mk-1.3.0/ -o ../arduino-mk-1.3.0.tar.gz + git archive HEAD --prefix=arduino-mk-1.3.1/ -o ../arduino-mk-1.3.1.tar.gz If you don't already have a rpmbuild setup (e.g. you've not installed the SRPM) you will need to create the directories: @@ -14,7 +14,7 @@ Then copy the tarball and specfile into those directories: - cp ../arduino-mk-1.3.0.tar.gz ~/rpmbuild/SOURCES/ + cp ../arduino-mk-1.3.1.tar.gz ~/rpmbuild/SOURCES/ cp packaging/fedora/arduino-mk.spec ~/rpmbuild/SPECS/ Then compile. This will create a binary and source RPM: diff -Nru arduino-mk-1.3.0/packaging/fedora/arduino-mk.spec arduino-mk-1.3.1/packaging/fedora/arduino-mk.spec --- arduino-mk-1.3.0/packaging/fedora/arduino-mk.spec 2014-01-29 06:23:26.000000000 +0000 +++ arduino-mk-1.3.1/packaging/fedora/arduino-mk.spec 2014-02-04 12:59:18.000000000 +0000 @@ -1,5 +1,5 @@ Name: arduino-mk -Version: 1.3.0 +Version: 1.3.1 Release: 1%{dist} Summary: Program your Arduino from the command line Packager: Simon John @@ -51,6 +51,8 @@ %{_docdir}/%{name}/examples %changelog +* Sat Feb 01 2014 Simon John +- Updated version. * Mon Jan 13 2014 Simon John - Removed arduino-mk subdirectory * Mon Dec 30 2013 Simon John