From 489dbb6fbb3d4ecdf43784ecf84937b027904cc6 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sun, 1 Jul 2012 13:04:39 +0200 Subject: [PATCH] modified 'make size' behaviour --- arduino-mk/Arduino.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 16e5929..068ba0a 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -85,6 +85,9 @@ # 0.9.1 01.vii.2012 Gaftech # - Allow user to choose source files # (LOCAL_*_SRCS flags) +# - Modified 'make size' behaviour: using --mcu option +# and targetting .elf file instead of .hex +# file. # ######################################################################## # @@ -509,6 +512,7 @@ CFLAGS = -std=gnu99 CXXFLAGS = -fno-exceptions ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp LDFLAGS = -mmcu=$(MCU) -Wl,--gc-sections -Os +SIZEFLAGS ?= --mcu=$(MCU) -C # Expand and pick the first port ARD_PORT = $(firstword $(wildcard $(ARDUINO_PORT))) @@ -696,8 +700,8 @@ clean: depends: $(DEPS) cat $(DEPS) > $(DEP_FILE) -size: $(OBJDIR) $(TARGET_HEX) - $(SIZE) $(TARGET_HEX) +size: $(OBJDIR) $(TARGET_ELF) + $(SIZE) $(SIZEFLAGS) $(TARGET_ELF) show_boards: $(PARSE_BOARD_CMD) --boards