Skip to content

Commit fa8fb60

Browse files
authored
Dump out the largest symbols in flash and in RAM. (#17397)
1 parent 589bded commit fa8fb60

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

builddefs/build_keyboard.mk

+13
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,19 @@ check-size: build
471471
check-md5: build
472472
objs-size: build
473473

474+
ifeq ($(strip $(TOP_SYMBOLS)),yes)
475+
all: top-symbols
476+
check-size: top-symbols
477+
top-symbols: build
478+
echo "###########################################"
479+
echo "# Highest flash usage:"
480+
$(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'
481+
echo "###########################################"
482+
echo "# Highest RAM usage:"
483+
$(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'
484+
echo "###########################################"
485+
endif
486+
474487
include $(BUILDDEFS_PATH)/show_options.mk
475488
include $(BUILDDEFS_PATH)/common_rules.mk
476489

0 commit comments

Comments
 (0)