Took another couple of changes from @peplin's PR #256 for chipKIT

This commit is contained in:
Simon John 2015-07-09 22:26:02 +02:00
parent da5f42be21
commit 28210c85a9
2 changed files with 11 additions and 5 deletions

View file

@ -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)

View file

@ -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