From abbd020bf4dcfe596f1d27d2f19b6128d49ffdc8 Mon Sep 17 00:00:00 2001 From: Simon John Date: Thu, 9 Jul 2015 18:05:28 +0200 Subject: 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 ++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 35 insertions(+), 33 deletions(-) (limited to 'Arduino.mk') 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 $@ -- cgit v1.2.3 From 28210c85a92d3f38efc98581621735605dec1ad1 Mon Sep 17 00:00:00 2001 From: Simon John Date: Thu, 9 Jul 2015 22:26:02 +0200 Subject: Took another couple of changes from @peplin's PR #256 for chipKIT --- Arduino.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Arduino.mk') 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) -- cgit v1.2.3 From 98f91e65cfd821474831f1a5aecff89af11a210e Mon Sep 17 00:00:00 2001 From: Paul Russo Date: Tue, 14 Jul 2015 00:19:52 -0600 Subject: Added support for AVR Dragon in both ISP and DebugWire mode --- Arduino.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Arduino.mk') 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 -- cgit v1.2.3 From 8e787ca161df3c631a165d0ba48ac02efb07fcae Mon Sep 17 00:00:00 2001 From: Sven Dahlstrand Date: Sun, 6 Sep 2015 13:14:19 +0200 Subject: 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 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Arduino.mk') 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 ######################################################################## -- cgit v1.2.3 From 44fe2270a2d1a2685c3682506ae92eeaa61ea4c5 Mon Sep 17 00:00:00 2001 From: Simon John Date: Sun, 13 Sep 2015 09:49:53 +0100 Subject: 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 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Arduino.mk') 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 -- cgit v1.2.3 From af17878bc4efa0a7aefce5e47b0ad44454c06c70 Mon Sep 17 00:00:00 2001 From: Simon John Date: Tue, 15 Sep 2015 00:00:30 +0100 Subject: 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 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Arduino.mk') 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]) -- cgit v1.2.3 From ba24a6ff4d624040e6316084e54b5ce4f93ece4a Mon Sep 17 00:00:00 2001 From: Thomas Kilian Date: Mon, 21 Sep 2015 20:41:44 +0200 Subject: Add path examples for both Mac IDE versions --- Arduino.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Arduino.mk') 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 -- cgit v1.2.3 From edcaa8557b1117dcee96b3a7c4d6fa736d80ac81 Mon Sep 17 00:00:00 2001 From: Albert Pretorius Date: Mon, 26 Oct 2015 19:07:53 +0000 Subject: Better parsing of boards.txt file which allows Adafruit Trinket to be used --- Arduino.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Arduino.mk') 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 -- cgit v1.2.3 From 9115d9e030757300995616d967709746ab8060f2 Mon Sep 17 00:00:00 2001 From: Simon John Date: Wed, 16 Dec 2015 18:27:31 +0000 Subject: 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 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Arduino.mk') 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') -- cgit v1.2.3 From c67f505a710c594c36974d23b3223a95aabd9c8f Mon Sep 17 00:00:00 2001 From: Simon John Date: Mon, 28 Dec 2015 10:05:53 +0000 Subject: 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 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Arduino.mk') 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 -- cgit v1.2.3 From 37debe9d70a5b40a8751b123b8284b995ed9eafa Mon Sep 17 00:00:00 2001 From: andrew hutchison Date: Fri, 19 Feb 2016 15:01:15 -0700 Subject: added show_submenu target --- Arduino.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Arduino.mk') 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\ -- cgit v1.2.3 From c0fea5ccd9d4db662c2a64e8c390d671d138bae7 Mon Sep 17 00:00:00 2001 From: Sudar Muthu Date: Mon, 22 Feb 2016 17:21:46 +0530 Subject: Bump up version to v1.5.1 for release --- Arduino.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Arduino.mk') 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 # -- cgit v1.2.3