From 0f95c0865cec9cefde37dcb1bca32360a6741f0d Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue, 16 Jul 2019 14:45:31 +0900 Subject: [PATCH] add 'objs-size' target into tmk_core/avr.mk (#5490) --- build_keyboard.mk | 1 + tmk_core/rules.mk | 3 +++ 2 files changed, 4 insertions(+) diff --git a/build_keyboard.mk b/build_keyboard.mk index 0e3c5ea23..b08642065 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 96b6e3a27..0edf6adf5 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