summaryrefslogtreecommitdiff
path: root/builddefs
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2023-01-04 05:07:50 +0000
committerQMK Bot <hello@qmk.fm>2023-01-04 05:07:50 +0000
commit03a728f71c18b8a5355153cd29b2a59c19500261 (patch)
tree442f8fdaa8ce3f9cd063330bd99a93730d7e27a1 /builddefs
parent115c241f21d35028a188d88c710fb5770c809da7 (diff)
parent8e869da1dac0c656cad4a628b5035f8ecbcbd4fa (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/build_keyboard.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk
index 499e6ffc69..8999ac80ad 100644
--- a/builddefs/build_keyboard.mk
+++ b/builddefs/build_keyboard.mk
@@ -491,16 +491,21 @@ check-size: build
check-md5: build
objs-size: build
+ifneq ($(strip $(TOP_SYMBOLS)),)
ifeq ($(strip $(TOP_SYMBOLS)),yes)
+NUM_TOP_SYMBOLS := 10
+else
+NUM_TOP_SYMBOLS := $(strip $(TOP_SYMBOLS))
+endif
all: top-symbols
check-size: top-symbols
top-symbols: build
echo "###########################################"
echo "# Highest flash usage:"
- $(NM) -Crtd --size-sort $(BUILD_DIR)/$(TARGET).elf | grep -i ' [t] ' | head -n10 | sed -e 's#^0000000# #g' -e 's#^000000# #g' -e 's#^00000# #g' -e 's#^0000# #g' -e 's#^000# #g' -e 's#^00# #g' -e 's#^0# #g'
+ $(NM) -Crtd --size-sort $(BUILD_DIR)/$(TARGET).elf | grep -i ' [t] ' | head -n$(NUM_TOP_SYMBOLS) | sed -e 's#^0000000# #g' -e 's#^000000# #g' -e 's#^00000# #g' -e 's#^0000# #g' -e 's#^000# #g' -e 's#^00# #g' -e 's#^0# #g'
echo "###########################################"
echo "# Highest RAM usage:"
- $(NM) -Crtd --size-sort $(BUILD_DIR)/$(TARGET).elf | grep -i ' [dbv] ' | head -n10 | sed -e 's#^0000000# #g' -e 's#^000000# #g' -e 's#^00000# #g' -e 's#^0000# #g' -e 's#^000# #g' -e 's#^00# #g' -e 's#^0# #g'
+ $(NM) -Crtd --size-sort $(BUILD_DIR)/$(TARGET).elf | grep -i ' [dbv] ' | head -n$(NUM_TOP_SYMBOLS) | sed -e 's#^0000000# #g' -e 's#^000000# #g' -e 's#^00000# #g' -e 's#^0000# #g' -e 's#^000# #g' -e 's#^00# #g' -e 's#^0# #g'
echo "###########################################"
endif