diff options
| author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-22 11:50:24 -0500 |
|---|---|---|
| committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-28 09:43:33 -0500 |
| commit | 067afbb8e4f6800909c01bf5f75fd90929c6c313 (patch) | |
| tree | 19c76058cc80510f1c30bff5ebcc95a25b2f7507 /chipKIT.mk | |
| parent | ac0b7d46c32eb03801e97c1c7e4d586fe93b3bfa (diff) | |
Override complete compiler tool paths for chipKIT.
Previously we were setting the AVR tools path to the PIC32 tools path because it
made grabbing the compiling tools easier. Consequently, it made finding the
avrdude path much harder, especially since the avrdude files are in different
locations in the Linux distributions of MPIDE and Arduino.
Instead, we set the AVR tools path to the *correct* path (where *AVR* dude
lives), and totally override the CC, CXX, etc. paths to point to their PIC32
equivalents.
Diffstat (limited to 'chipKIT.mk')
| -rw-r--r-- | chipKIT.mk | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -57,21 +57,13 @@ ifndef MPIDE_PREFERENCES_PATH endif endif - -AVR_TOOLS_DIR = $(ARDUINO_DIR)/hardware/pic32/compiler/pic32-tools - -# The same as in Arduino, the Linux distribution contains avrdude and -# avrdude.conf in a different location. ifeq ($(CURRENT_OS),LINUX) - AVRDUDE_DIR = $(ARDUINO_DIR)/hardware/tools - AVRDUDE = $(AVRDUDE_DIR)/avrdude - AVRDUDE_CONF = $(AVRDUDE_DIR)/avrdude.conf -else - AVRDUDE_DIR = $(ARDUINO_DIR)/hardware/tools/avr - AVRDUDE = $(AVRDUDE_DIR)/bin/avrdude - AVRDUDE_CONF = $(AVRDUDE_DIR)/etc/avrdude.conf + BUNDLED_AVR_TOOLS_DIR = $(call dir_if_exists,$(MPIDE_DIR)/hardware/tools) endif +PIC32_TOOLS_DIR = $(ARDUINO_DIR)/hardware/pic32/compiler/pic32-tools +PIC32_TOOLS_PATH = $(PIC32_TOOLS_DIR)/bin + ALTERNATE_CORE = pic32 ALTERNATE_CORE_PATH = $(MPIDE_DIR)/hardware/pic32 ARDUINO_CORE_PATH = $(ALTERNATE_CORE_PATH)/cores/$(ALTERNATE_CORE) @@ -88,6 +80,17 @@ AR_NAME = pic32-ar OBJDUMP_NAME = pic32-objdump OBJCOPY_NAME = pic32-objcopy SIZE_NAME = pic32-size +NM_NAME = pic32-nm + +OVERRIDE_EXECUTABLES = 1 +CC = $(PIC32_TOOLS_PATH)/$(CC_NAME) +CXX = $(PIC32_TOOLS_PATH)/$(CXX_NAME) +AS = $(PIC32_TOOLS_PATH)/$(AS_NAME) +OBJCOPY = $(PIC32_TOOLS_PATH)/$(OBJCOPY_NAME) +OBJDUMP = $(PIC32_TOOLS_PATH)/$(OBJDUMP_NAME) +AR = $(PIC32_TOOLS_PATH)/$(AR_NAME) +SIZE = $(PIC32_TOOLS_PATH)/$(SIZE_NAME) +NM = $(PIC32_TOOLS_PATH)/$(NM_NAME) LDSCRIPT = $(call PARSE_BOARD,$(BOARD_TAG),ldscript) LDSCRIPT_FILE = $(ARDUINO_CORE_PATH)/$(LDSCRIPT) |
