From c6fef7c499a21ec1443f540957ae2f4ae3544841 Mon Sep 17 00:00:00 2001 From: Martin Oldfield Date: Mon, 17 Sep 2012 16:05:21 +0100 Subject: [PATCH 1/8] Added installation notes for Fedora as per Rickard Lindberg's patch; tweaked notes for other OSs --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f086c92..8dfd6f8 100644 --- a/README.md +++ b/README.md @@ -38,14 +38,23 @@ On Linux, you might prefer: AVR_TOOLS_DIR = /usr The Makefile also delegates resetting the board to a short Perl program. -You'll need to install Device::SerialPort to use it though. On Debian or -Ubuntu do +You'll need to install Device::SerialPort to use it though. You'll also +need the YAML library to run ard-parse-boards. + +On Debian or Ubuntu: apt-get install libdevice-serial-perl + apt-get install libyaml-perl -On other systems +On Fedora: + + yum install perl-Device-SerialPort + yum install perl-YAML + +On other systems: cpanm Device::SerialPort + cpanm YAML ## User Libraries From b15aa4e88f25c48badfe2545835a148bb8f67243 Mon Sep 17 00:00:00 2001 From: Martin Oldfield Date: Mon, 17 Sep 2012 16:14:40 +0100 Subject: [PATCH 2/8] Made the size target look at the ELF file, not the hex, as per Jared Szechy's patch. Craig Leres made a similar comment --- arduino-mk/Arduino.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 5261afa..38d8217 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -679,8 +679,8 @@ clean: depends: $(DEPS) cat $(DEPS) > $(DEP_FILE) -size: $(OBJDIR) $(TARGET_HEX) - $(SIZE) $(TARGET_HEX) +size: $(OBJDIR) $(TARGET_ELF) + $(SIZE) -C --mcu=$(MCU) $(TARGET_ELF) show_boards: $(PARSE_BOARD_CMD) --boards From 22b4a0834ab7c5123df908fd546198688c96023c Mon Sep 17 00:00:00 2001 From: Martin Oldfield Date: Mon, 17 Sep 2012 16:25:21 +0100 Subject: [PATCH 3/8] Fixed ARDUNIO/ARDUINO typo in README.md as per Kalin Kozhuharov's comment --- README.md | 2 +- arduino-mk/Arduino.mk | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8dfd6f8..a55efbf 100644 --- a/README.md +++ b/README.md @@ -60,5 +60,5 @@ On other systems: In order to use Arduino libraries installed in the user's sketchbook folder (the standard location for custom libraries when using the Arduino IDE), you need to -set the `ARDUNIO_SKETCHBOOK` variable to point to this directory. By default it +set the `ARDUINO_SKETCHBOOK` variable to point to this directory. By default it is set to `$HOME/sketchbook`. diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 38d8217..315eddc 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -418,7 +418,9 @@ ISP_EXT_FUSE = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) bootloader.extended endif # Everything gets built in here -OBJDIR = build-cli +ifndef OBJDIR +OBJDIR = build-$(BOARD_TAG) +endif ######################################################################## # Local sources From 03c80333a48c6c3b8706c6393c90bec8bc5f8aa1 Mon Sep 17 00:00:00 2001 From: Martin Oldfield Date: Mon, 17 Sep 2012 16:29:31 +0100 Subject: [PATCH 4/8] Only set OBJDIR if it is not already set; if we do set it make it $BOARD_TAG dependent. This follows comments from Matthias Urlichs and Scott Howard --- arduino-mk/Arduino.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 315eddc..dc8aa6c 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -417,7 +417,7 @@ ifndef ISP_EXT_FUSE ISP_EXT_FUSE = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) bootloader.extended_fuses) endif -# Everything gets built in here +# Everything gets built in here (include BOARD_TAG now) ifndef OBJDIR OBJDIR = build-$(BOARD_TAG) endif From c02da764aca6b6553d7d9b5d9dbdb6f4148e5cb6 Mon Sep 17 00:00:00 2001 From: Martin Oldfield Date: Mon, 17 Sep 2012 16:34:12 +0100 Subject: [PATCH 5/8] Changed the name of the Debian/Ubuntu package to arduino-mk (just a documentation patch) as per Scott Howard's comment --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a55efbf..0d949ae 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ documentation](http://mjo.tc/atelier/2009/02/arduino-cli.html "Documentation") exists. If you're using Debian or Ubuntu, you can find this in the -arduino-core package. +arduino-mk package. # Important Changes, 2012-04-29 From 9395817c96766004fa01d062c2cdaca659852a17 Mon Sep 17 00:00:00 2001 From: Martin Oldfield Date: Mon, 17 Sep 2012 16:38:46 +0100 Subject: [PATCH 6/8] Only set AVRDUDE_CONF if it's not set, as per Tom Hall's patch --- arduino-mk/Arduino.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index dc8aa6c..f12637d 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -285,9 +285,11 @@ ifdef ARDUINO_DIR ifndef AVR_TOOLS_DIR AVR_TOOLS_DIR = $(ARDUINO_DIR)/hardware/tools/avr -# The avrdude bundled with Arduino can't find it's config +# The avrdude bundled with Arduino can't find its config +ifndef AVRDUDE_CONF AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf endif +endif ifndef AVR_TOOLS_PATH AVR_TOOLS_PATH = $(AVR_TOOLS_DIR)/bin From 869b5d85161c3e59f4ff05419eb6d70dfdc1a6ed Mon Sep 17 00:00:00 2001 From: Martin Oldfield Date: Mon, 17 Sep 2012 17:06:48 +0100 Subject: [PATCH 7/8] Added support for the USB PID/VID needed for the Leonardo, as per patches from Dan Villiom Podlaski Christiansen and Marc Plano-Lesay --- arduino-mk/Arduino.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index f12637d..6a6fcc7 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -389,6 +389,15 @@ ifndef F_CPU F_CPU = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) build.f_cpu) endif +# USB IDs for the Leonardo +ifndef USB_VID +USB_VID = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) build.vid) +endif + +ifndef USB_PID +USB_PID = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) build.pid) +endif + # normal programming info ifndef AVRDUDE_ARD_PROGRAMMER AVRDUDE_ARD_PROGRAMMER = $(shell $(PARSE_BOARD_CMD) $(BOARD_TAG) upload.protocol) @@ -501,7 +510,9 @@ USER_LIB_OBJS = $(patsubst $(USER_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(USER_LIB_ CPPFLAGS = -mmcu=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_VERSION) \ -I. -I$(ARDUINO_CORE_PATH) -I$(ARDUINO_VAR_PATH)/$(VARIANT) \ $(SYS_INCLUDES) $(USER_INCLUDES) -g -Os -w -Wall \ + -DUSB_VID=$(USB_VID) -DUSB_PID=$(USB_PID) \ -ffunction-sections -fdata-sections + CFLAGS = -std=gnu99 CXXFLAGS = -fno-exceptions ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp From 184230fcf2ac9075fee642be8948d406913cb7df Mon Sep 17 00:00:00 2001 From: Martin Oldfield Date: Mon, 17 Sep 2012 18:08:22 +0100 Subject: [PATCH 8/8] Added changelog --- arduino-mk/Arduino.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 6a6fcc7..09819ac 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -77,6 +77,18 @@ # - Moved the reset target to Perl for # clarity and better error handling (ex # Daniele Vergini) +# +# 0.10 17.ix.12 M J Oldfield +# - Added installation notes for Fedora (ex Rickard Lindberg). +# - Changed size target so that it looks at the ELF object, +# not the hexfile (ex Jared Szechy and Scott Howard). +# - Fixed ARDUNIO typo in README.md (ex Kalin Kozhuharov). +# - Tweaked OBJDIR handling (ex Matthias Urlichs and Scott Howard). +# - Changed the name of the Debian/Ubuntu package (ex +# Scott Howard). +# - Only set AVRDUDE_CONF if it's not set (ex Tom Hall). +# - Added support for USB_PID/VID used by the Leonardo (ex Dan +# Villiom Podlaski Christiansen and Marc Plano-Lesay). # ######################################################################## #