From 11939a41b7d7bf399cd01ea560238e3d73866bd8 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 2 Apr 2012 17:19:39 -0400 Subject: [PATCH] Don't append AVR_TOOLS_PATH if we're on Linux, we already have it in the path. --- arduino-mk/Arduino.mk | 8 ++++++++ arduino-mk/chipKIT.mk | 10 +++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index b71249f..f116d80 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -282,6 +282,14 @@ ifndef ISP_EXT_FUSE ISP_EXT_FUSE = $(shell $(PARSE_BOARD) $(BOARD_TAG) bootloader.extended_fuses) endif +ifndef BOARD +BOARD = $(shell $(PARSE_BOARD), $(BOARD_TAG), board) +endif + +ifndef LDSCRIPT +LDSCRIPT = $(shell $(PARSE_BOARD), $(BOARD_TAG), ldscript) +endif + # Everything gets built in here OBJDIR = build-cli diff --git a/arduino-mk/chipKIT.mk b/arduino-mk/chipKIT.mk index 42895cf..1b13311 100644 --- a/arduino-mk/chipKIT.mk +++ b/arduino-mk/chipKIT.mk @@ -33,10 +33,6 @@ else AVRDUDE_ETC_PATH = $(AVRDUDE_TOOLS_PATH) endif -ifndef BOARD -BOARD = $(shell $(PARSE_BOARD) $(BOARD_TAG) board) -endif - ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/pic32/cores/pic32 ARDUINO_LIB_PATH = $(ARDUINO_DIR)/hardware/pic32/libraries BOARDS_TXT = $(ARDUINO_DIR)/hardware/pic32/boards.txt @@ -49,10 +45,8 @@ AR_NAME = pic32-ar OBJDUMP_NAME = pic32-objdump OBJCOPY_NAME = pic32-objcopy -LDSCRIPT = $(shell $(PARSE_BOARD) $(BOARD_TAG) ldscript) -LDSCRIPT_FILE = $(ARDUINO_CORE_PATH)/$(LDSCRIPT) - MCU_FLAG_NAME=mprocessor +LDSCRIPT_FILE = $(ARDUINO_CORE_PATH)/$(LDSCRIPT) EXTRA_LDFLAGS = -T$(ARDUINO_CORE_PATH)/$(LDSCRIPT) EXTRA_CPPFLAGS = -mno-smart-io -D$(BOARD) @@ -60,6 +54,7 @@ CHIPKIT_MK_PATH := $(dir $(lastword $(MAKEFILE_LIST))) include $(CHIPKIT_MK_PATH)/Arduino.mk +ifeq ($(OSTYPE),Linux) # MPIDE still comes with the compilers on Linux, unlike Arduino CC := $(addprefix $(AVR_TOOLS_PATH),$(CC)) CXX := $(addprefix $(AVR_TOOLS_PATH),$(CXX)) @@ -68,3 +63,4 @@ OBJDUMP := $(addprefix $(AVR_TOOLS_PATH),$(OBJDUMP)) AR := $(addprefix $(AVR_TOOLS_PATH),$(AR)) SIZE := $(addprefix $(AVR_TOOLS_PATH),$(SIZE)) NM := $(addprefix $(AVR_TOOLS_PATH),$(NM)) +endif