From abbd020bf4dcfe596f1d27d2f19b6128d49ffdc8 Mon Sep 17 00:00:00 2001 From: Simon John Date: Thu, 9 Jul 2015 18:05:28 +0200 Subject: [PATCH 01/26] Preserve source extension for object files. Needed to fix the new wiring_pulse.S in IDE 1.6.5 which also has a wiring_pulse.c source file. Mostly rebased @peplin's PR #266, so should allow us to support newer chipKIT builds too. --- Arduino.mk | 68 ++++++++++++++++++++++++++++-------------------------- HISTORY.md | 3 ++- 2 files changed, 37 insertions(+), 34 deletions(-) diff --git a/Arduino.mk b/Arduino.mk index aabe8e7..7f1060b 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -763,9 +763,9 @@ LOCAL_AS_SRCS ?= $(wildcard *.S) LOCAL_SRCS = $(LOCAL_C_SRCS) $(LOCAL_CPP_SRCS) \ $(LOCAL_CC_SRCS) $(LOCAL_PDE_SRCS) \ $(LOCAL_INO_SRCS) $(LOCAL_AS_SRCS) -LOCAL_OBJ_FILES = $(LOCAL_C_SRCS:.c=.o) $(LOCAL_CPP_SRCS:.cpp=.o) \ - $(LOCAL_CC_SRCS:.cc=.o) $(LOCAL_PDE_SRCS:.pde=.o) \ - $(LOCAL_INO_SRCS:.ino=.o) $(LOCAL_AS_SRCS:.S=.o) +LOCAL_OBJ_FILES = $(LOCAL_C_SRCS:.c=.c.o) $(LOCAL_CPP_SRCS:.cpp=.cpp.o) \ + $(LOCAL_CC_SRCS:.cc=.cc.o) $(LOCAL_PDE_SRCS:.pde=.pde.o) \ + $(LOCAL_INO_SRCS:.ino=.ino.o) $(LOCAL_AS_SRCS:.S=.S.o) LOCAL_OBJS = $(patsubst %,$(OBJDIR)/%,$(LOCAL_OBJ_FILES)) ifeq ($(words $(LOCAL_SRCS)), 0) @@ -797,13 +797,14 @@ ifeq ($(strip $(NO_CORE)),) CORE_C_SRCS = $(wildcard $(ARDUINO_CORE_PATH)/*.c) CORE_C_SRCS += $(wildcard $(ARDUINO_CORE_PATH)/avr-libc/*.c) CORE_CPP_SRCS = $(wildcard $(ARDUINO_CORE_PATH)/*.cpp) + CORE_AS_SRCS = $(wildcard $(ARDUINO_CORE_PATH)/*.S) ifneq ($(strip $(NO_CORE_MAIN_CPP)),) CORE_CPP_SRCS := $(filter-out %main.cpp, $(CORE_CPP_SRCS)) $(call show_config_info,NO_CORE_MAIN_CPP set so core library will not include main.cpp,[MANUAL]) endif - CORE_OBJ_FILES = $(CORE_C_SRCS:.c=.o) $(CORE_CPP_SRCS:.cpp=.o) $(CORE_AS_SRCS:.S=.o) + CORE_OBJ_FILES = $(CORE_C_SRCS:.c=.c.o) $(CORE_CPP_SRCS:.cpp=.cpp.o) $(CORE_AS_SRCS:.S=.S.o) CORE_OBJS = $(patsubst $(ARDUINO_CORE_PATH)/%, \ $(OBJDIR)/core/%,$(CORE_OBJ_FILES)) endif @@ -811,6 +812,7 @@ else $(call show_config_info,NO_CORE set so core library will not be built,[MANUAL]) endif + ######################################################################## # Determine ARDUINO_LIBS automatically @@ -953,21 +955,21 @@ LIB_AS_SRCS := $(foreach lib, $(SYS_LIBS), $(call get_library_files,$(l USER_LIB_CPP_SRCS := $(foreach lib, $(USER_LIBS), $(call get_library_files,$(lib),cpp)) USER_LIB_C_SRCS := $(foreach lib, $(USER_LIBS), $(call get_library_files,$(lib),c)) USER_LIB_AS_SRCS := $(foreach lib, $(USER_LIBS), $(call get_library_files,$(lib),S)) -LIB_OBJS = $(patsubst $(ARDUINO_LIB_PATH)/%.c,$(OBJDIR)/libs/%.o,$(LIB_C_SRCS)) \ - $(patsubst $(ARDUINO_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(LIB_CPP_SRCS)) \ - $(patsubst $(ARDUINO_LIB_PATH)/%.S,$(OBJDIR)/libs/%.o,$(LIB_AS_SRCS)) -USER_LIB_OBJS = $(patsubst $(USER_LIB_PATH)/%.cpp,$(OBJDIR)/userlibs/%.o,$(USER_LIB_CPP_SRCS)) \ - $(patsubst $(USER_LIB_PATH)/%.c,$(OBJDIR)/userlibs/%.o,$(USER_LIB_C_SRCS)) \ - $(patsubst $(USER_LIB_PATH)/%.S,$(OBJDIR)/userlibs/%.o,$(USER_LIB_AS_SRCS)) +LIB_OBJS = $(patsubst $(ARDUINO_LIB_PATH)/%.c,$(OBJDIR)/libs/%.c.o,$(LIB_C_SRCS)) \ + $(patsubst $(ARDUINO_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.cpp.o,$(LIB_CPP_SRCS)) \ + $(patsubst $(ARDUINO_LIB_PATH)/%.S,$(OBJDIR)/libs/%.S.o,$(LIB_AS_SRCS)) +USER_LIB_OBJS = $(patsubst $(USER_LIB_PATH)/%.cpp,$(OBJDIR)/userlibs/%.cpp.o,$(USER_LIB_CPP_SRCS)) \ + $(patsubst $(USER_LIB_PATH)/%.c,$(OBJDIR)/userlibs/%.c.o,$(USER_LIB_C_SRCS)) \ + $(patsubst $(USER_LIB_PATH)/%.S,$(OBJDIR)/userlibs/%.S.o,$(USER_LIB_AS_SRCS)) ifdef ARDUINO_PLATFORM_LIB_PATH PLATFORM_INCLUDES := $(foreach lib, $(PLATFORM_LIBS), $(call get_library_includes,$(lib))) PLATFORM_LIB_CPP_SRCS := $(foreach lib, $(PLATFORM_LIBS), $(call get_library_files,$(lib),cpp)) PLATFORM_LIB_C_SRCS := $(foreach lib, $(PLATFORM_LIBS), $(call get_library_files,$(lib),c)) PLATFORM_LIB_AS_SRCS := $(foreach lib, $(PLATFORM_LIBS), $(call get_library_files,$(lib),S)) - PLATFORM_LIB_OBJS := $(patsubst $(ARDUINO_PLATFORM_LIB_PATH)/%.cpp,$(OBJDIR)/platformlibs/%.o,$(PLATFORM_LIB_CPP_SRCS)) \ - $(patsubst $(ARDUINO_PLATFORM_LIB_PATH)/%.c,$(OBJDIR)/platformlibs/%.o,$(PLATFORM_LIB_C_SRCS)) \ - $(patsubst $(ARDUINO_PLATFORM_LIB_PATH)/%.S,$(OBJDIR)/platformlibs/%.o,$(PLATFORM_LIB_AS_SRCS)) + PLATFORM_LIB_OBJS := $(patsubst $(ARDUINO_PLATFORM_LIB_PATH)/%.cpp,$(OBJDIR)/platformlibs/%.cpp.o,$(PLATFORM_LIB_CPP_SRCS)) \ + $(patsubst $(ARDUINO_PLATFORM_LIB_PATH)/%.c,$(OBJDIR)/platformlibs/%.c.o,$(PLATFORM_LIB_C_SRCS)) \ + $(patsubst $(ARDUINO_PLATFORM_LIB_PATH)/%.S,$(OBJDIR)/platformlibs/%.S.o,$(PLATFORM_LIB_AS_SRCS)) endif @@ -989,7 +991,7 @@ ifndef DEBUG_FLAGS endif # SoftwareSerial requires -Os (some delays are tuned for this optimization level) -%SoftwareSerial.o : OPTIMIZATION_FLAGS = -Os +%SoftwareSerial.cpp.o : OPTIMIZATION_FLAGS = -Os ifndef MCU_FLAG_NAME MCU_FLAG_NAME = mmcu @@ -1142,39 +1144,39 @@ $(call show_separator) # easy to change the build options in future # library sources -$(OBJDIR)/libs/%.o: $(ARDUINO_LIB_PATH)/%.c +$(OBJDIR)/libs/%.c.o: $(ARDUINO_LIB_PATH)/%.c @$(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@ -$(OBJDIR)/libs/%.o: $(ARDUINO_LIB_PATH)/%.cpp +$(OBJDIR)/libs/%.cpp.o: $(ARDUINO_LIB_PATH)/%.cpp @$(MKDIR) $(dir $@) $(CXX) -MMD -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ -$(OBJDIR)/libs/%.o: $(ARDUINO_LIB_PATH)/%.S +$(OBJDIR)/libs/%.S.o: $(ARDUINO_LIB_PATH)/%.S @$(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(ASFLAGS) $< -o $@ -$(OBJDIR)/platformlibs/%.o: $(ARDUINO_PLATFORM_LIB_PATH)/%.c +$(OBJDIR)/platformlibs/%.c.o: $(ARDUINO_PLATFORM_LIB_PATH)/%.c @$(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@ -$(OBJDIR)/platformlibs/%.o: $(ARDUINO_PLATFORM_LIB_PATH)/%.cpp +$(OBJDIR)/platformlibs/%.cpp.o: $(ARDUINO_PLATFORM_LIB_PATH)/%.cpp @$(MKDIR) $(dir $@) $(CXX) -MMD -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ -$(OBJDIR)/platformlibs/%.o: $(ARDUINO_PLATFORM_LIB_PATH)/%.S +$(OBJDIR)/platformlibs/%.S.o: $(ARDUINO_PLATFORM_LIB_PATH)/%.S @$(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(ASFLAGS) $< -o $@ -$(OBJDIR)/userlibs/%.o: $(USER_LIB_PATH)/%.cpp +$(OBJDIR)/userlibs/%.cpp.o: $(USER_LIB_PATH)/%.cpp @$(MKDIR) $(dir $@) $(CXX) -MMD -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ -$(OBJDIR)/userlibs/%.o: $(USER_LIB_PATH)/%.c +$(OBJDIR)/userlibs/%.c.o: $(USER_LIB_PATH)/%.c @$(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@ -$(OBJDIR)/userlibs/%.o: $(USER_LIB_PATH)/%.S +$(OBJDIR)/userlibs/%.S.o: $(USER_LIB_PATH)/%.S @$(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(ASFLAGS) $< -o $@ @@ -1185,33 +1187,33 @@ else endif # normal local sources -$(OBJDIR)/%.o: %.c $(COMMON_DEPS) | $(OBJDIR) +$(OBJDIR)/%.c.o: %.c $(COMMON_DEPS) | $(OBJDIR) @$(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@ -$(OBJDIR)/%.o: %.cc $(COMMON_DEPS) | $(OBJDIR) +$(OBJDIR)/%.cc.o: %.cc $(COMMON_DEPS) | $(OBJDIR) @$(MKDIR) $(dir $@) $(CXX) -MMD -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ -$(OBJDIR)/%.o: %.cpp $(COMMON_DEPS) | $(OBJDIR) +$(OBJDIR)/%.cpp.o: %.cpp $(COMMON_DEPS) | $(OBJDIR) @$(MKDIR) $(dir $@) $(CXX) -MMD -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ -$(OBJDIR)/%.o: %.S $(COMMON_DEPS) | $(OBJDIR) +$(OBJDIR)/%.S.o: %.S $(COMMON_DEPS) | $(OBJDIR) @$(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(ASFLAGS) $< -o $@ -$(OBJDIR)/%.o: %.s $(COMMON_DEPS) | $(OBJDIR) +$(OBJDIR)/%.s.o: %.s $(COMMON_DEPS) | $(OBJDIR) @$(MKDIR) $(dir $@) $(CC) -c $(CPPFLAGS) $(ASFLAGS) $< -o $@ # the pde -> o file -$(OBJDIR)/%.o: %.pde $(COMMON_DEPS) | $(OBJDIR) +$(OBJDIR)/%.pde.o: %.pde $(COMMON_DEPS) | $(OBJDIR) @$(MKDIR) $(dir $@) $(CXX) -x c++ -include $(ARDUINO_HEADER) -MMD -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ # the ino -> o file -$(OBJDIR)/%.o: %.ino $(COMMON_DEPS) | $(OBJDIR) +$(OBJDIR)/%.ino.o: %.ino $(COMMON_DEPS) | $(OBJDIR) @$(MKDIR) $(dir $@) $(CXX) -x c++ -include $(ARDUINO_HEADER) -MMD -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ @@ -1229,15 +1231,15 @@ $(OBJDIR)/%.s: %.cpp $(COMMON_DEPS) | $(OBJDIR) $(CXX) -x c++ -include $(ARDUINO_HEADER) -MMD -S -fverbose-asm $(CPPFLAGS) $(CXXFLAGS) $< -o $@ # core files -$(OBJDIR)/core/%.o: $(ARDUINO_CORE_PATH)/%.c $(COMMON_DEPS) | $(OBJDIR) +$(OBJDIR)/core/%.c.o: $(ARDUINO_CORE_PATH)/%.c $(COMMON_DEPS) | $(OBJDIR) @$(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@ -$(OBJDIR)/core/%.o: $(ARDUINO_CORE_PATH)/%.cpp $(COMMON_DEPS) | $(OBJDIR) +$(OBJDIR)/core/%.cpp.o: $(ARDUINO_CORE_PATH)/%.cpp $(COMMON_DEPS) | $(OBJDIR) @$(MKDIR) $(dir $@) $(CXX) -MMD -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ -$(OBJDIR)/core/%.o: $(ARDUINO_CORE_PATH)/%.S $(COMMON_DEPS) | $(OBJDIR) +$(OBJDIR)/core/%.S.o: $(ARDUINO_CORE_PATH)/%.S $(COMMON_DEPS) | $(OBJDIR) @$(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(ASFLAGS) $< -o $@ diff --git a/HISTORY.md b/HISTORY.md index 6f830d2..e62ab94 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -9,12 +9,13 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - 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) +- New: Add support for picocom as serial monitor (https://github.com/biesiad) - Tweak: Looks for submenu items first when parsing BOARDS_TXT (Issue #347) (https://github.com/sej7278) - Tweak: Various spelling/grammar/typo fixes (https://github.com/dcousens) - Tweak: Clarified some 1.5+ issues in docs (Issue #352) (https://github.com/sej7278) - Tweak: Added some more Continuous Integration tests (https://github.com/sej7278) - Tweak: Updated Fedora instructions (https://github.com/sej7278) +- Fix: Preserve original extension for object files, fixes parseIntASM (Issue #255, #364) (https://github.com/sej7278) ### 1.5 (2015-04-07) - New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e) From 62fb4668c5c58264784fae9e04b38b2f5088c39c Mon Sep 17 00:00:00 2001 From: Simon John Date: Thu, 9 Jul 2015 20:13:16 +0200 Subject: [PATCH 02/26] fix typo, add more info about asm core sources --- HISTORY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index e62ab94..98b87e8 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -15,7 +15,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - Tweak: Clarified some 1.5+ issues in docs (Issue #352) (https://github.com/sej7278) - Tweak: Added some more Continuous Integration tests (https://github.com/sej7278) - Tweak: Updated Fedora instructions (https://github.com/sej7278) -- Fix: Preserve original extension for object files, fixes parseIntASM (Issue #255, #364) (https://github.com/sej7278) +- Fix: Preserve original extension for object files, support asm sources in core, fixes pulseInASM (Issue #255, #364) (https://github.com/sej7278) ### 1.5 (2015-04-07) - New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e) From da5f42be21263a5f87d0ab4a7f13fc1ca2a007eb Mon Sep 17 00:00:00 2001 From: Simon John Date: Thu, 9 Jul 2015 21:18:40 +0200 Subject: [PATCH 03/26] Added space between -T and linker script to allow mpide-0023-linux64-20140821 to build (blink at least!) --- chipKIT.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chipKIT.mk b/chipKIT.mk index 06d85e3..0cf09f5 100644 --- a/chipKIT.mk +++ b/chipKIT.mk @@ -107,8 +107,8 @@ LDSCRIPT = $(call PARSE_BOARD,$(BOARD_TAG),ldscript) LDSCRIPT_FILE = $(ARDUINO_CORE_PATH)/$(LDSCRIPT) MCU_FLAG_NAME=mprocessor -LDFLAGS += -T$(ARDUINO_CORE_PATH)/$(LDSCRIPT) -LDFLAGS += -T$(ARDUINO_CORE_PATH)/chipKIT-application-COMMON.ld +LDFLAGS += -T $(ARDUINO_CORE_PATH)/$(LDSCRIPT) +LDFLAGS += -T $(ARDUINO_CORE_PATH)/chipKIT-application-COMMON.ld CPPFLAGS += -mno-smart-io -fno-short-double CFLAGS_STD = From 28210c85a92d3f38efc98581621735605dec1ad1 Mon Sep 17 00:00:00 2001 From: Simon John Date: Thu, 9 Jul 2015 22:26:02 +0200 Subject: [PATCH 04/26] Took another couple of changes from @peplin's PR #256 for chipKIT --- Arduino.mk | 2 +- chipKIT.mk | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Arduino.mk b/Arduino.mk index 7f1060b..9c0d252 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -1407,7 +1407,7 @@ pre-build: $(call runscript_if_exists,$(PRE_BUILD_HOOK)) $(TARGET_ELF): $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) - $(CC) $(LDFLAGS) -o $@ $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) -lc -lm + $(CC) $(LDFLAGS) -o $@ $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) -lc -lm $(LINKER_SCRIPTS) $(CORE_LIB): $(CORE_OBJS) $(LIB_OBJS) $(PLATFORM_LIB_OBJS) $(USER_LIB_OBJS) $(AR) rcs $@ $(CORE_OBJS) $(LIB_OBJS) $(PLATFORM_LIB_OBJS) $(USER_LIB_OBJS) diff --git a/chipKIT.mk b/chipKIT.mk index 0cf09f5..298ac96 100644 --- a/chipKIT.mk +++ b/chipKIT.mk @@ -81,7 +81,11 @@ ARDUINO_CORE_PATH = $(ALTERNATE_CORE_PATH)/cores/$(ALTERNATE_CORE) ARDUINO_PREFERENCES_PATH = $(MPIDE_PREFERENCES_PATH) ARDUINO_DIR = $(MPIDE_DIR) -CORE_AS_SRCS = $(ARDUINO_CORE_PATH)/vector_table.S +CORE_AS_SRCS = $(ARDUINO_CORE_PATH)/vector_table.S \ + $(ARDUINO_CORE_PATH)/cpp-startup.S \ + $(ARDUINO_CORE_PATH)/crti.S \ + $(ARDUINO_CORE_PATH)/crtn.S \ + $(ARDUINO_CORE_PATH)/pic32_software_reset.S ARDUINO_VERSION = 23 @@ -107,9 +111,11 @@ LDSCRIPT = $(call PARSE_BOARD,$(BOARD_TAG),ldscript) LDSCRIPT_FILE = $(ARDUINO_CORE_PATH)/$(LDSCRIPT) MCU_FLAG_NAME=mprocessor -LDFLAGS += -T $(ARDUINO_CORE_PATH)/$(LDSCRIPT) -LDFLAGS += -T $(ARDUINO_CORE_PATH)/chipKIT-application-COMMON.ld -CPPFLAGS += -mno-smart-io -fno-short-double +LDFLAGS += -mdebugger -mno-peripheral-libs -nostartfiles -Wl,--gc-sections +LINKER_SCRIPTS += -T $(ARDUINO_CORE_PATH)/$(LDSCRIPT) +LINKER_SCRIPTS += -T $(ARDUINO_CORE_PATH)/chipKIT-application-COMMON.ld +CPPFLAGS += -mno-smart-io -fno-short-double -fframe-base-loclist \ + -g3 -Wcast-align -D_BOARD_MEGA_ CFLAGS_STD = include $(ARDMK_DIR)/Arduino.mk From 98f91e65cfd821474831f1a5aecff89af11a210e Mon Sep 17 00:00:00 2001 From: Paul Russo Date: Tue, 14 Jul 2015 00:19:52 -0600 Subject: [PATCH 05/26] Added support for AVR Dragon in both ISP and DebugWire mode --- Arduino.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino.mk b/Arduino.mk index 9c0d252..ba16697 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -1370,7 +1370,7 @@ endif AVRDUDE_ISP_OPTS = -c $(ISP_PROG) -b $(AVRDUDE_ISP_BAUDRATE) ifndef $(ISP_PORT) - ifneq ($(strip $(ISP_PROG)),$(filter $(ISP_PROG), usbasp usbtiny gpio linuxgpio avrispmkii)) + ifneq ($(strip $(ISP_PROG)),$(filter $(ISP_PROG), usbasp usbtiny gpio linuxgpio avrispmkii dragon_isp dragon_dw)) AVRDUDE_ISP_OPTS += -P $(call get_isp_port) endif else From 1fb7cddf0e632653e44619397fbc802df4e40136 Mon Sep 17 00:00:00 2001 From: Simon John Date: Tue, 14 Jul 2015 14:45:51 +0200 Subject: [PATCH 06/26] Add AVR Dragon commit info to HISTORY.md --- HISTORY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.md b/HISTORY.md index 98b87e8..c97add8 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 AVR Dragon to list of ISP's without a port (https://github.com/mtnocean) - 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) From f7efd1ba9739c098475230a8d37e4c4a11c2ef9c Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 4 Aug 2015 21:44:15 -0400 Subject: [PATCH 07/26] Fix typo --- examples/MakefileExample/Makefile-example.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/MakefileExample/Makefile-example.mk b/examples/MakefileExample/Makefile-example.mk index 9b6a118..d9411d1 100644 --- a/examples/MakefileExample/Makefile-example.mk +++ b/examples/MakefileExample/Makefile-example.mk @@ -38,12 +38,12 @@ AVR_TOOLS_DIR = /usr/local ### or on Linux: (remove the one you don't want) AVR_TOOLS_DIR = /usr -### AVRDDUDE +### AVRDUDE ### Path to avrdude directory. ### On OS X with `homebrew`: -AVRDDUDE = /usr/local/bin/avrdude +AVRDUDE = /usr/local/bin/avrdude ### or on Linux: (remove the one you don't want) -AVRDDUDE = /usr/bin/avrdude +AVRDUDE = /usr/bin/avrdude ### CFLAGS_STD ### Set the C standard to be used during compilation. Documentation (https://github.com/WeAreLeka/Arduino-Makefile/blob/std-flags/arduino-mk-vars.md#cflags_std) From 8e787ca161df3c631a165d0ba48ac02efb07fcae Mon Sep 17 00:00:00 2001 From: Sven Dahlstrand Date: Sun, 6 Sep 2015 13:14:19 +0200 Subject: [PATCH 08/26] Make sure TARGET is set correctly when CURDIR contains spaces. With this fix the `TARGET` variable is set correctly when the project directory (or its path) contains spaces. So in this case: /Users/Joe/Dropbox (Personal)/example project `TARGET` will be set to `example_project` instead of `Dropbox example project` (like it was before this fix). --- Arduino.mk | 4 +++- HISTORY.md | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Arduino.mk b/Arduino.mk index ba16697..43e1bb8 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -266,7 +266,9 @@ endif # Default TARGET to pwd (ex Daniele Vergini) ifndef TARGET - TARGET = $(notdir $(CURDIR)) + space := + space += + TARGET = $(notdir $(subst $(space),_,$(CURDIR))) endif ######################################################################## diff --git a/HISTORY.md b/HISTORY.md index c97add8..2c98b35 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -17,6 +17,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - Tweak: Added some more Continuous Integration tests (https://github.com/sej7278) - Tweak: Updated Fedora instructions (https://github.com/sej7278) - Fix: Preserve original extension for object files, support asm sources in core, fixes pulseInASM (Issue #255, #364) (https://github.com/sej7278) +- Fix: Make sure TARGET is set correctly when CURDIR contains spaces. ### 1.5 (2015-04-07) - New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e) From 81d0669869435251b6029f3b41560197577024df Mon Sep 17 00:00:00 2001 From: Sven Dahlstrand Date: Sun, 6 Sep 2015 14:14:22 +0200 Subject: [PATCH 09/26] Add documentation for the TARGET variable. --- arduino-mk-vars.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arduino-mk-vars.md b/arduino-mk-vars.md index e509bb4..706a72b 100644 --- a/arduino-mk-vars.md +++ b/arduino-mk-vars.md @@ -378,6 +378,26 @@ OBJDIR = /path/to/my/project-directory/bin ---- +### TARGET + +**Description:** + +What name you would like for generated target files. + +Defaults to the name of your current working directory, but with underscores (_) instead of spaces. + +**Example:** + +```Makefile +TARGET = my-project +``` + +Will generate targets like `my-project.hex` and `my-project.elf`. + +**Requirement:** *Optional* + +---- + ### ALTERNATE_CORE **Description:** From 7efd0ccd2c420a369f4934553c3e98c1de187e02 Mon Sep 17 00:00:00 2001 From: Simon John Date: Mon, 7 Sep 2015 11:21:43 +0100 Subject: [PATCH 10/26] Added contributor details to history --- HISTORY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 2c98b35..e28f896 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -17,7 +17,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - Tweak: Added some more Continuous Integration tests (https://github.com/sej7278) - Tweak: Updated Fedora instructions (https://github.com/sej7278) - Fix: Preserve original extension for object files, support asm sources in core, fixes pulseInASM (Issue #255, #364) (https://github.com/sej7278) -- Fix: Make sure TARGET is set correctly when CURDIR contains spaces. +- Fix: Make sure TARGET is set correctly when CURDIR contains spaces (https://github.com/svendahlstrand) ### 1.5 (2015-04-07) - New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e) From 44fe2270a2d1a2685c3682506ae92eeaa61ea4c5 Mon Sep 17 00:00:00 2001 From: Simon John Date: Sun, 13 Sep 2015 09:49:53 +0100 Subject: [PATCH 11/26] Ensure AVRDUDE_CONF is set when AVR_TOOLS_DIR is manually set by user, not just on Windows - fixes issue #381 Code around this area probably needs a tidy up at some point. --- Arduino.mk | 11 ++++++----- HISTORY.md | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Arduino.mk b/Arduino.mk index 43e1bb8..b77984e 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -452,11 +452,12 @@ ifndef AVR_TOOLS_DIR else $(call show_config_variable,AVR_TOOLS_DIR,[USER]) - # Check in Windows as Cygwin is being used, that the configuration file for the AVRDUDE is set - # Check if it works on MAC - ifeq ($(CURRENT_OS),WINDOWS) - ifndef AVRDUDE_CONF - AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf + # ensure we can still find avrdude.conf + ifndef AVRDUDE_CONF + ifeq ($(shell expr $(ARDUINO_VERSION) '>' 157), 1) + AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf + else + AVRDUDE_CONF = $(AVR_TOOLS_DIR)/../avrdude.conf endif endif diff --git a/HISTORY.md b/HISTORY.md index e28f896..c684539 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -18,6 +18,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - Tweak: Updated Fedora instructions (https://github.com/sej7278) - Fix: Preserve original extension for object files, support asm sources in core, fixes pulseInASM (Issue #255, #364) (https://github.com/sej7278) - Fix: Make sure TARGET is set correctly when CURDIR contains spaces (https://github.com/svendahlstrand) +- Fix: Ensure AVRDUDE_CONF is set when AVR_TOOLS_DIR is, not just on Windows (Issue #381) (https://github.com/sej7278) ### 1.5 (2015-04-07) - New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e) From af17878bc4efa0a7aefce5e47b0ad44454c06c70 Mon Sep 17 00:00:00 2001 From: Simon John Date: Tue, 15 Sep 2015 00:00:30 +0100 Subject: [PATCH 12/26] Replace $VENDOR with $ARDMK_VENDOR as $VENDOR is a tcsh environment variable. $ARCHITECTURE is probably safe as that's usually called $ARCH. Fixes issue #386. Need to decide if this is going to upset too many user's who have already started using $VENDOR - and who uses tcsh? ;-) --- Arduino.mk | 22 +++++++++++----------- HISTORY.md | 1 + Teensy.mk | 4 ++-- arduino-mk-vars.md | 4 ++-- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Arduino.mk b/Arduino.mk index b77984e..561793d 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -319,11 +319,11 @@ endif ######################################################################## # 1.5.x vendor - defaults to arduino -ifndef VENDOR - VENDOR = arduino - $(call show_config_variable,VENDOR,[DEFAULT]) +ifndef ARDMK_VENDOR + ARDMK_VENDOR = arduino + $(call show_config_variable,ARDMK_VENDOR,[DEFAULT]) else - $(call show_config_variable,VENDOR,[USER]) + $(call show_config_variable,ARDMK_VENDOR,[USER]) endif ######################################################################## @@ -474,7 +474,7 @@ $(call show_config_variable,ARDUINO_LIB_PATH,[COMPUTED],(from ARDUINO_DIR)) ifndef ARDUINO_PLATFORM_LIB_PATH ifeq ($(shell expr $(ARDUINO_VERSION) '>' 150), 1) # only for 1.5 - ARDUINO_PLATFORM_LIB_PATH = $(ARDUINO_DIR)/hardware/$(VENDOR)/$(ARCHITECTURE)/libraries + ARDUINO_PLATFORM_LIB_PATH = $(ARDUINO_DIR)/hardware/$(ARDMK_VENDOR)/$(ARCHITECTURE)/libraries $(call show_config_variable,ARDUINO_PLATFORM_LIB_PATH,[COMPUTED],(from ARDUINO_DIR)) endif else @@ -511,14 +511,14 @@ ifdef ALTERNATE_CORE_PATH else ifndef ARDUINO_VAR_PATH - ARDUINO_VAR_PATH = $(ARDUINO_DIR)/hardware/$(VENDOR)/$(ARCHITECTURE)/variants + ARDUINO_VAR_PATH = $(ARDUINO_DIR)/hardware/$(ARDMK_VENDOR)/$(ARCHITECTURE)/variants $(call show_config_variable,ARDUINO_VAR_PATH,[COMPUTED],(from ARDUINO_DIR)) else $(call show_config_variable,ARDUINO_VAR_PATH,[USER]) endif ifndef BOARDS_TXT - BOARDS_TXT = $(ARDUINO_DIR)/hardware/$(VENDOR)/$(ARCHITECTURE)/boards.txt + BOARDS_TXT = $(ARDUINO_DIR)/hardware/$(ARDMK_VENDOR)/$(ARCHITECTURE)/boards.txt $(call show_config_variable,BOARDS_TXT,[COMPUTED],(from ARDUINO_DIR)) else $(call show_config_variable,BOARDS_TXT,[USER]) @@ -704,16 +704,16 @@ else $(call show_config_variable,OBJDIR,[USER]) endif -# Now that we have ARDUINO_DIR, VENDOR, ARCHITECTURE and CORE, +# Now that we have ARDUINO_DIR, ARDMK_VENDOR, ARCHITECTURE and CORE, # we can set ARDUINO_CORE_PATH. ifndef ARDUINO_CORE_PATH ifeq ($(strip $(CORE)),) - ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/$(VENDOR)/$(ARCHITECTURE)/cores/arduino + ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/$(ARDMK_VENDOR)/$(ARCHITECTURE)/cores/arduino $(call show_config_variable,ARDUINO_CORE_PATH,[DEFAULT]) else ARDUINO_CORE_PATH = $(ALTERNATE_CORE_PATH)/cores/$(CORE) ifeq ($(wildcard $(ARDUINO_CORE_PATH)),) - ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/$(VENDOR)/$(ARCHITECTURE)/cores/$(CORE) + ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/$(ARDMK_VENDOR)/$(ARCHITECTURE)/cores/$(CORE) $(call show_config_variable,ARDUINO_CORE_PATH,[COMPUTED],(from ARDUINO_DIR, BOARD_TAG and boards.txt)) else $(call show_config_variable,ARDUINO_CORE_PATH,[COMPUTED],(from ALTERNATE_CORE_PATH, BOARD_TAG and boards.txt)) @@ -1121,7 +1121,7 @@ endif # either calculate parent dir from arduino dir, or user-defined path ifndef BOOTLOADER_PARENT - BOOTLOADER_PARENT = $(ARDUINO_DIR)/hardware/$(VENDOR)/$(ARCHITECTURE)/bootloaders + BOOTLOADER_PARENT = $(ARDUINO_DIR)/hardware/$(ARDMK_VENDOR)/$(ARCHITECTURE)/bootloaders $(call show_config_variable,BOOTLOADER_PARENT,[COMPUTED],(from ARDUINO_DIR)) else $(call show_config_variable,BOOTLOADER_PARENT,[USER]) diff --git a/HISTORY.md b/HISTORY.md index c684539..2ce6142 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -19,6 +19,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - Fix: Preserve original extension for object files, support asm sources in core, fixes pulseInASM (Issue #255, #364) (https://github.com/sej7278) - Fix: Make sure TARGET is set correctly when CURDIR contains spaces (https://github.com/svendahlstrand) - Fix: Ensure AVRDUDE_CONF is set when AVR_TOOLS_DIR is, not just on Windows (Issue #381) (https://github.com/sej7278) +- Fix: Rename VENDOR to ARDMK_VENDOR to workaround tcsh issue (Issue #386) (https://github.com/sej7278) ### 1.5 (2015-04-07) - New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e) diff --git a/Teensy.mk b/Teensy.mk index 8a441e7..3676c78 100644 --- a/Teensy.mk +++ b/Teensy.mk @@ -33,9 +33,9 @@ endif # include Common.mk now we know where it is include $(ARDMK_DIR)/Common.mk -VENDOR = teensy +ARDMK_VENDOR = teensy ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/teensy/cores/teensy3 -BOARDS_TXT = $(ARDUINO_DIR)/hardware/$(VENDOR)/boards.txt +BOARDS_TXT = $(ARDUINO_DIR)/hardware/$(ARDMK_VENDOR)/boards.txt ifndef F_CPU F_CPU=96000000 diff --git a/arduino-mk-vars.md b/arduino-mk-vars.md index 706a72b..c49201a 100644 --- a/arduino-mk-vars.md +++ b/arduino-mk-vars.md @@ -166,7 +166,7 @@ ARCHITECTURE = sam ---- -### VENDOR +### ARDMK_VENDOR **Description:** @@ -177,7 +177,7 @@ Defaults to `arduino` **Example:** ```Makefile -VENDOR = sparkfun +ARDMK_VENDOR = sparkfun ``` **Requirement:** *Optional* From ededb0ebbc8e2d8b0c712e9a166031dbedb06ef7 Mon Sep 17 00:00:00 2001 From: Thomas Kilian Date: Mon, 21 Sep 2015 17:34:47 +0200 Subject: [PATCH 13/26] Correct path ARDUINO_DIR for Macs --- examples/MakefileExample/Makefile-example.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/MakefileExample/Makefile-example.mk b/examples/MakefileExample/Makefile-example.mk index d9411d1..34c080f 100644 --- a/examples/MakefileExample/Makefile-example.mk +++ b/examples/MakefileExample/Makefile-example.mk @@ -15,7 +15,7 @@ ARDMK_DIR = $(PROJECT_DIR)/Arduino-Makefile ### ARDUINO_DIR ### Path to the Arduino application and resources directory. ### On OS X: -ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java +ARDUINO_DIR = /Applications/Arduino.app/Contents/Java ### or on Linux: (remove the one you don't want) ARDUINO_DIR = /usr/share/arduino From ba24a6ff4d624040e6316084e54b5ce4f93ece4a Mon Sep 17 00:00:00 2001 From: Thomas Kilian Date: Mon, 21 Sep 2015 20:41:44 +0200 Subject: [PATCH 14/26] Add path examples for both Mac IDE versions --- Arduino.mk | 7 ++++++- README.md | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Arduino.mk b/Arduino.mk index 561793d..eb94a3c 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -45,11 +45,16 @@ # that things are canonically arranged beneath the directories defined # above. # -# On the Mac you might want to set: +# On the Mac with IDE 1.0 you might want to set: # # ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java # ARDMK_DIR = /usr/local # +# On the Mac with IDE 1.5+ you might want to set: +# +# ARDUINO_DIR = /Applications/Arduino.app/Contents/Java +# ARDMK_DIR = /usr/local +# # On Linux, you might prefer: # # ARDUINO_DIR = /usr/share/arduino diff --git a/README.md b/README.md index 120d1da..19b0f0e 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ whilst [Blink](examples/Blink/Makefile) demonstrates the minimal settings requir Download a copy of this repo some where in your system or install it through a package. -On the Mac you might want to set: +On the Mac with IDE 1.0 you might want to set: ```make ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java @@ -144,6 +144,11 @@ On the Mac you might want to set: BOARD_TAG = mega2560 ``` +On the Mac with IDE 1.5+ it's like above but with + + ARDUINO_DIR = /Applications/Arduino.app/Contents/Java +``` + On Linux (if you have installed through package), you shouldn't need to set anything other than your board type and port: ```make From cba515531cdebc1bcb65527a1682a0e7ff362f5a Mon Sep 17 00:00:00 2001 From: Thomas Kilian Date: Mon, 21 Sep 2015 23:39:21 +0200 Subject: [PATCH 15/26] added missing quote in RAEDME.md and fix-note in HISTORY.md --- HISTORY.md | 1 + README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index 2ce6142..4ccf650 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -20,6 +20,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - Fix: Make sure TARGET is set correctly when CURDIR contains spaces (https://github.com/svendahlstrand) - Fix: Ensure AVRDUDE_CONF is set when AVR_TOOLS_DIR is, not just on Windows (Issue #381) (https://github.com/sej7278) - Fix: Rename VENDOR to ARDMK_VENDOR to workaround tcsh issue (Issue #386) (https://github.com/sej7278) +- Fix: Document OSX 1.0/1.6 ARDUINO_DIR differences (https://github.com/thomaskilian) ### 1.5 (2015-04-07) - New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e) diff --git a/README.md b/README.md index 19b0f0e..948cf8b 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,7 @@ On the Mac with IDE 1.0 you might want to set: On the Mac with IDE 1.5+ it's like above but with +``` ARDUINO_DIR = /Applications/Arduino.app/Contents/Java ``` From edcaa8557b1117dcee96b3a7c4d6fa736d80ac81 Mon Sep 17 00:00:00 2001 From: Albert Pretorius Date: Mon, 26 Oct 2015 19:07:53 +0000 Subject: [PATCH 16/26] Better parsing of boards.txt file which allows Adafruit Trinket to be used --- Arduino.mk | 2 +- HISTORY.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Arduino.mk b/Arduino.mk index eb94a3c..7b1342e 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -568,7 +568,7 @@ endif ifndef PARSE_BOARD # result = $(call READ_BOARD_TXT, 'boardname', 'parameter') - PARSE_BOARD = $(shell grep -v '^\#' $(BOARDS_TXT) | grep $(1).$(2)= | cut -d = -f 2 ) + PARSE_BOARD = $(shell grep -v '^\#' $(BOARDS_TXT) | grep "^[ \t]*$(1).$(2)=" | cut -d = -f 2) endif # If NO_CORE is set, then we don't have to parse boards.txt file diff --git a/HISTORY.md b/HISTORY.md index 4ccf650..7e8029b 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 +- Tweak: Add support for Adafruit trinket3/trinket5/protrinket3/protrinket5 by improved BOARDS_TXT parsing - New: Add AVR Dragon to list of ISP's without a port (https://github.com/mtnocean) - 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) From fb2567e7fb3ae8c50eea79bbd1524609587b5b03 Mon Sep 17 00:00:00 2001 From: Albert Pretorius Date: Tue, 27 Oct 2015 21:29:32 +0000 Subject: [PATCH 17/26] correct HISTORY.md order --- HISTORY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 7e8029b..62f74dc 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -6,12 +6,12 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it ### In Development -- Tweak: Add support for Adafruit trinket3/trinket5/protrinket3/protrinket5 by improved BOARDS_TXT parsing - New: Add AVR Dragon to list of ISP's without a port (https://github.com/mtnocean) - 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) +- Tweak: Add support for Adafruit trinket3/trinket5/protrinket3/protrinket5 by improved BOARDS_TXT parsing (Issue #393) (https://github/com/zabereer) - Tweak: Looks for submenu items first when parsing BOARDS_TXT (Issue #347) (https://github.com/sej7278) - Tweak: Various spelling/grammar/typo fixes (https://github.com/dcousens) - Tweak: Clarified some 1.5+ issues in docs (Issue #352) (https://github.com/sej7278) From 9115d9e030757300995616d967709746ab8060f2 Mon Sep 17 00:00:00 2001 From: Simon John Date: Wed, 16 Dec 2015 18:27:31 +0000 Subject: [PATCH 18/26] Fixed "make show_boards" regex to allow for hyphens in BOARD_TAG e.g. attiny44-20, thanks to Atmel for the sample chip! --- Arduino.mk | 2 +- HISTORY.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Arduino.mk b/Arduino.mk index 7b1342e..1ba6c6e 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -1495,7 +1495,7 @@ size: $(TARGET_HEX) $(call avr_size,$(TARGET_ELF),$(TARGET_HEX)) show_boards: - @$(CAT) $(BOARDS_TXT) | grep -E '^[a-zA-Z0-9_]+.name' | sort -uf | sed 's/.name=/:/' | column -s: -t + @$(CAT) $(BOARDS_TXT) | grep -E '^[a-zA-Z0-9_\-]+.name' | sort -uf | sed 's/.name=/:/' | column -s: -t monitor: ifeq ($(MONITOR_CMD), 'putty') diff --git a/HISTORY.md b/HISTORY.md index 62f74dc..39a3522 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -22,6 +22,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - Fix: Ensure AVRDUDE_CONF is set when AVR_TOOLS_DIR is, not just on Windows (Issue #381) (https://github.com/sej7278) - Fix: Rename VENDOR to ARDMK_VENDOR to workaround tcsh issue (Issue #386) (https://github.com/sej7278) - Fix: Document OSX 1.0/1.6 ARDUINO_DIR differences (https://github.com/thomaskilian) +- Fix: Fix regex to support BOARD_TAGs with hyphens e.g. attiny44-20 (https://github.com/sej7278) ### 1.5 (2015-04-07) - New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e) From c67f505a710c594c36974d23b3223a95aabd9c8f Mon Sep 17 00:00:00 2001 From: Simon John Date: Mon, 28 Dec 2015 10:05:53 +0000 Subject: [PATCH 19/26] Removed the check for BOOTLOADER_PATH being empty as its merged into BOOTLOADER_FILE in 1.5+ Now we just check for BOOTLOADER_FILE being non-empty on both versions. Fixes issue #402 --- Arduino.mk | 6 ++---- HISTORY.md | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Arduino.mk b/Arduino.mk index 1ba6c6e..ab7ecd9 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -1358,10 +1358,8 @@ endif # Bootloader file settings ifndef AVRDUDE_ISP_BURN_BOOTLOADER - ifneq ($(strip $(BOOTLOADER_PATH)),) - ifneq ($(strip $(BOOTLOADER_FILE)),) - AVRDUDE_ISP_BURN_BOOTLOADER += -U flash:w:$(BOOTLOADER_PARENT)/$(BOOTLOADER_PATH)/$(BOOTLOADER_FILE):i - endif + ifneq ($(strip $(BOOTLOADER_FILE)),) + AVRDUDE_ISP_BURN_BOOTLOADER += -U flash:w:$(BOOTLOADER_PARENT)/$(BOOTLOADER_PATH)/$(BOOTLOADER_FILE):i endif endif diff --git a/HISTORY.md b/HISTORY.md index 39a3522..47f1dc8 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -23,6 +23,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - Fix: Rename VENDOR to ARDMK_VENDOR to workaround tcsh issue (Issue #386) (https://github.com/sej7278) - Fix: Document OSX 1.0/1.6 ARDUINO_DIR differences (https://github.com/thomaskilian) - Fix: Fix regex to support BOARD_TAGs with hyphens e.g. attiny44-20 (https://github.com/sej7278) +- Fix: Remove check for BOOTLOADER_PATH, just check for BOOTLOADER_FILE (Issue #402) (https://github.com/sej7278) ### 1.5 (2015-04-07) - New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e) From 745b520dd6de348c2016a9c699b8590290819195 Mon Sep 17 00:00:00 2001 From: Gaute Hope Date: Mon, 8 Feb 2016 23:09:56 +0100 Subject: [PATCH 20/26] ard-reset-arduino: support pyserial 3.0 --- HISTORY.md | 1 + bin/ard-reset-arduino | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 47f1dc8..07b8e68 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -24,6 +24,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it - Fix: Document OSX 1.0/1.6 ARDUINO_DIR differences (https://github.com/thomaskilian) - Fix: Fix regex to support BOARD_TAGs with hyphens e.g. attiny44-20 (https://github.com/sej7278) - Fix: Remove check for BOOTLOADER_PATH, just check for BOOTLOADER_FILE (Issue #402) (https://github.com/sej7278) +- Fix: Port ard-reset-arduino to pyserial 3.0 (#407, #408) (https://github.com/gauteh) ### 1.5 (2015-04-07) - New: Add support for new 1.5.x library layout (Issue #275) (https://github.com/lukasz-e) diff --git a/bin/ard-reset-arduino b/bin/ard-reset-arduino index 3e43486..bca0b03 100755 --- a/bin/ard-reset-arduino +++ b/bin/ard-reset-arduino @@ -6,6 +6,12 @@ import os.path import argparse from time import sleep +pyserial_version = None +try: + pyserial_version = int(serial.VERSION[0]) +except: + pyserial_version = 2 # less than 2.3 + parser = argparse.ArgumentParser(description='Reset an Arduino') parser.add_argument('--caterina', action='store_true', help='Reset a Leonardo, Micro, Robot or LilyPadUSB.') parser.add_argument('--verbose', action='store_true', help="Watch what's going on on STDERR.") @@ -17,7 +23,12 @@ if args.caterina: if args.verbose: print('Forcing reset using 1200bps open/close on port %s' % args.port[0]) ser = serial.Serial(args.port[0], 57600) ser.close() - ser.setBaudrate(1200) + + if pyserial_version < 3: + ser.setBaudRate (1200) + else: + ser.baudrate = 1200 + ser.open() ser.setRTS(True) # RTS line needs to be held high and DTR low ser.setDTR(False) # (see Arduino IDE source code) From 6ac297ded9b83a86b2729c3e2e926b1940feafc4 Mon Sep 17 00:00:00 2001 From: Sudar Muthu Date: Tue, 9 Feb 2016 15:45:02 +0530 Subject: [PATCH 21/26] Don't upgrade setuptools while bootstrap travis environment For some reason the command `pip install --upgrade setuptools` fails in the new travis build infrastructure. You can see the full error log in #404 Fix #404 --- tests/script/bootstrap/common.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/script/bootstrap/common.sh b/tests/script/bootstrap/common.sh index a6b6415..c3cd90e 100644 --- a/tests/script/bootstrap/common.sh +++ b/tests/script/bootstrap/common.sh @@ -184,7 +184,6 @@ if [ -z $COMMON_SOURCED ]; then PIP_SUDO_CMD=$SUDO_CMD fi - $PIP_SUDO_CMD pip install --upgrade setuptools $PIP_SUDO_CMD pip install --src dependencies --pre -Ur $BOOTSTRAP_DIR/pip-requirements.txt COMMON_SOURCED=1 From 03f5852f2dd34476ba833656593af8b4658ffbd3 Mon Sep 17 00:00:00 2001 From: Gaute Hope Date: Thu, 11 Feb 2016 20:07:34 +0100 Subject: [PATCH 22/26] should be setBaudrate not setBaudRate --- bin/ard-reset-arduino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ard-reset-arduino b/bin/ard-reset-arduino index bca0b03..1f2c7e9 100755 --- a/bin/ard-reset-arduino +++ b/bin/ard-reset-arduino @@ -25,7 +25,7 @@ if args.caterina: ser.close() if pyserial_version < 3: - ser.setBaudRate (1200) + ser.setBaudrate (1200) else: ser.baudrate = 1200 From 37debe9d70a5b40a8751b123b8284b995ed9eafa Mon Sep 17 00:00:00 2001 From: andrew hutchison Date: Fri, 19 Feb 2016 15:01:15 -0700 Subject: [PATCH 23/26] added show_submenu target --- Arduino.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Arduino.mk b/Arduino.mk index ab7ecd9..bd75ea4 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -1495,6 +1495,9 @@ size: $(TARGET_HEX) show_boards: @$(CAT) $(BOARDS_TXT) | grep -E '^[a-zA-Z0-9_\-]+.name' | sort -uf | sed 's/.name=/:/' | column -s: -t +show_submenu: + @$(CAT) $(BOARDS_TXT) | grep -E '[a-zA-Z0-9_\-]+.menu.cpu.[a-zA-Z0-9_\-]+=' | sort -uf | sed 's/.menu.cpu./:/' | sed 's/=/:/' | column -s: -t + monitor: ifeq ($(MONITOR_CMD), 'putty') ifneq ($(strip $(MONITOR_PARMS)),) @@ -1543,6 +1546,7 @@ help: make reset - reset the Arduino by tickling DTR or changing baud\n\ rate on the serial port.\n\ make show_boards - list all the boards defined in boards.txt\n\ + make show_submenu - list all board submenus defined in boards.txt\n\ make monitor - connect to the Arduino's serial port\n\ make size - show the size of the compiled output (relative to\n\ resources, if you have a patched avr-size).\n\ From 42194444173b2b0116159b5db6a19199a13b652c Mon Sep 17 00:00:00 2001 From: andrew hutchison Date: Fri, 19 Feb 2016 15:05:26 -0700 Subject: [PATCH 24/26] updated BOARD_TAG to indicate show_submenu target --- arduino-mk-vars.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arduino-mk-vars.md b/arduino-mk-vars.md index c49201a..9a925e0 100644 --- a/arduino-mk-vars.md +++ b/arduino-mk-vars.md @@ -281,7 +281,7 @@ BOARD_TAG = uno or mega2560 **Description:** -1.5+ submenu as listed in `boards.txt` +1.5+ submenu as listed in `boards.txt` or `make show_submenu`. **Example:** From a1832e2759a47f989d9d3e242f76bde8ff6977ab Mon Sep 17 00:00:00 2001 From: andrew hutchison Date: Fri, 19 Feb 2016 15:08:51 -0700 Subject: [PATCH 25/26] update changelog to reflect show_submenu target --- HISTORY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.md b/HISTORY.md index 07b8e68..a6a8b4d 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 show_submenu target (https://github.com/drewhutchison) - New: Add AVR Dragon to list of ISP's without a port (https://github.com/mtnocean) - 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) From c0fea5ccd9d4db662c2a64e8c390d671d138bae7 Mon Sep 17 00:00:00 2001 From: Sudar Muthu Date: Mon, 22 Feb 2016 17:21:46 +0530 Subject: [PATCH 26/26] Bump up version to v1.5.1 for release --- Arduino.mk | 2 +- HISTORY.md | 2 +- README.md | 2 +- ard-reset-arduino.1 | 2 +- packaging/fedora/arduino-mk.spec | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Arduino.mk b/Arduino.mk index bd75ea4..322ca38 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -19,7 +19,7 @@ # # Original Arduino adaptation by mellis, eighthave, oli.keller # -# Current version: 1.5 +# Current version: 1.5.1 # # Refer to HISTORY.md file for complete history of changes # diff --git a/HISTORY.md b/HISTORY.md index a6a8b4d..13dde6e 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,7 +4,7 @@ A Makefile for Arduino Sketches 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. -### In Development +### 1.5.1 (Debian version: 1.5-3) (2016-02-22) - New: Add show_submenu target (https://github.com/drewhutchison) - New: Add AVR Dragon to list of ISP's without a port (https://github.com/mtnocean) diff --git a/README.md b/README.md index 948cf8b..bf59185 100644 --- a/README.md +++ b/README.md @@ -248,7 +248,7 @@ See examples/BlinkTeensy for example usage. ## Versioning -The current version of the makefile is `1.5`. You can find the full history in the [HISTORY.md](HISTORY.md) file +The current version of the makefile is `1.5.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 --git a/ard-reset-arduino.1 b/ard-reset-arduino.1 index d7b2eb1..b897869 100644 --- a/ard-reset-arduino.1 +++ b/ard-reset-arduino.1 @@ -1,4 +1,4 @@ -.TH ARD-RESET-ARDUINO "1" "April 2015" "ard-reset-arduino 1.5" "Arduino CLI Reset" +.TH ARD-RESET-ARDUINO "1" "February 2016" "ard-reset-arduino 1.5.1" "Arduino CLI Reset" .SH NAME ard-reset-arduino - Reset Arduino board diff --git a/packaging/fedora/arduino-mk.spec b/packaging/fedora/arduino-mk.spec index ef870bb..30b7a09 100644 --- a/packaging/fedora/arduino-mk.spec +++ b/packaging/fedora/arduino-mk.spec @@ -1,5 +1,5 @@ Name: arduino-mk -Version: 1.5 +Version: 1.5.1 Release: 1%{dist} Summary: Program your Arduino from the command line Packager: Simon John