From e44540043edb15c0ab7eab2a8d0cb3241933ce8e Mon Sep 17 00:00:00 2001 From: Pieter du Preez Date: Fri, 14 Sep 2018 16:14:14 +0200 Subject: Added the TOOL_PREFIX variable for setting up the executable tools. Currently three different tool chains seem to be used: * avr-* * pic32-* * arm-none-eabi-* These all get set up independently. This patch centralizes the definitions of the executable tools and does it generically, by means of the newly introduced TOOL_PREFIX variable. Setting up a tool chain is now simply a matter of defining the TOOL_PREFIX variable. For the currently supported tool chains it gets set to avr, pic32 or arm-none-eabi. Arbitrary tool chains can now easily be set up, by the TOOL_PREFIX variable. Although the use of the OVERRIDE_EXECUTABLES variable is now almost not justifiable, it was left as-is, in order to assure backwards compatibility. --- chipKIT.mk | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'chipKIT.mk') diff --git a/chipKIT.mk b/chipKIT.mk index 298ac96..e5e4386 100644 --- a/chipKIT.mk +++ b/chipKIT.mk @@ -72,8 +72,7 @@ ifeq ($(CURRENT_OS),LINUX) AVRDUDE_CONF = $(AVRDUDE_DIR)/avrdude.conf endif -PIC32_TOOLS_DIR = $(ARDUINO_DIR)/hardware/pic32/compiler/pic32-tools -PIC32_TOOLS_PATH = $(PIC32_TOOLS_DIR)/bin +AVR_TOOLS_DIR = $(ARDUINO_DIR)/hardware/pic32/compiler/pic32-tools ALTERNATE_CORE = pic32 ALTERNATE_CORE_PATH = $(MPIDE_DIR)/hardware/pic32 @@ -89,23 +88,7 @@ CORE_AS_SRCS = $(ARDUINO_CORE_PATH)/vector_table.S \ ARDUINO_VERSION = 23 -CC_NAME = pic32-gcc -CXX_NAME = pic32-g++ -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) +TOOL_PREFIX = pic32 LDSCRIPT = $(call PARSE_BOARD,$(BOARD_TAG),ldscript) LDSCRIPT_FILE = $(ARDUINO_CORE_PATH)/$(LDSCRIPT) -- cgit v1.2.3