aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arduino-mk/Arduino.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk
index ffa91b4..9df8080 100644
--- a/arduino-mk/Arduino.mk
+++ b/arduino-mk/Arduino.mk
@@ -94,6 +94,7 @@
#
# 0.9.2 06.vi.2012 Sudar
# - Allow user to choose source files (LOCAL_*_SRCS flags) (https://github.com/Gaftech)
+# - Modified 'make size' behaviour: using --mcu option and targeting .elf file instead of .hex file.(https://github.com/Gaftech)
#
########################################################################
#
@@ -518,6 +519,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)))
@@ -705,8 +707,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