summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi ISHII <2170248+mtei@users.noreply.github.com>2019-07-16 14:45:31 +0900
committerFlorian Didron <fdidron@users.noreply.github.com>2019-07-19 10:06:48 +0900
commitffc273b14aac51f906d5c6d88fc69a2e3a393487 (patch)
tree9faeaf1858496d3c245e7e49d78b18e98ef2719e
parent7f75ee8cd68461cdfbcf8c6c14e7fc522fef52d6 (diff)
add 'objs-size' target into tmk_core/avr.mk (#5490)
-rw-r--r--build_keyboard.mk1
-rw-r--r--tmk_core/rules.mk3
2 files changed, 4 insertions, 0 deletions
diff --git a/build_keyboard.mk b/build_keyboard.mk
index d5b10f3745..dd7926af69 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -398,6 +398,7 @@ $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
all: build check-size
build: elf cpfirmware
check-size: build
+objs-size: build
include show_options.mk
include $(TMK_PATH)/rules.mk
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index 96b6e3a271..0edf6adf51 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -390,6 +390,9 @@ show_path:
@echo SRC=$(SRC)
@echo OBJ=$(OBJ)
+objs-size:
+ for i in $(OBJ); do echo $$i; done | sort | xargs $(SIZE)
+
ifeq ($(findstring avr-gcc,$(CC)),avr-gcc)
SIZE_MARGIN = 1024