diff options
| author | Nick Brassel <nick@tzarc.org> | 2022-06-16 09:55:15 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-16 09:55:15 +1000 |
| commit | fa8fb6027952cfeda532ff4712c07e80cde8cfbf (patch) | |
| tree | bbe3ba06b96ffd412ee5f5286aed7b8632dcd2dd | |
| parent | 589bdedc470975406ddc0b0ce1034ecd44cd3f00 (diff) | |
Dump out the largest symbols in flash and in RAM. (#17397)
| -rw-r--r-- | builddefs/build_keyboard.mk | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index a258f33216..2b9ec48e70 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk | |||
| @@ -471,6 +471,19 @@ check-size: build | |||
| 471 | check-md5: build | 471 | check-md5: build |
| 472 | objs-size: build | 472 | objs-size: build |
| 473 | 473 | ||
| 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 | |||
| 474 | include $(BUILDDEFS_PATH)/show_options.mk | 487 | include $(BUILDDEFS_PATH)/show_options.mk |
| 475 | include $(BUILDDEFS_PATH)/common_rules.mk | 488 | include $(BUILDDEFS_PATH)/common_rules.mk |
| 476 | 489 | ||
