X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Frules.mk;h=e51dbfe7c6a1c19c52eb3c3dec25f68b392e33a4;hb=6af77551c67c846b06c596cbd367d66c755f8051;hp=8f876a383c4e786b18d63ab21247cf2e4766fcd3;hpb=75795186135e6d83de1ff3bb108f9c5471742ba4;p=qmk_firmware.git diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 8f876a383..e51dbfe7c 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 @@ -398,6 +401,7 @@ check-size: $(eval CURRENT_SIZE=$(shell if [ -f $(BUILD_DIR)/$(TARGET).hex ]; then $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(AWK) 'NR==2 {print $$4}'; else printf 0; fi)) $(eval FREE_SIZE=$(shell expr $(MAX_SIZE) - $(CURRENT_SIZE))) $(eval OVER_SIZE=$(shell expr $(CURRENT_SIZE) - $(MAX_SIZE))) + $(eval PERCENT_SIZE=$(shell expr $(CURRENT_SIZE) \* 100 / $(MAX_SIZE))) if [ $(MAX_SIZE) -gt 0 ] && [ $(CURRENT_SIZE) -gt 0 ]; then \ $(SILENT) || printf "$(MSG_CHECK_FILESIZE)" | $(AWK_CMD); \ if [ $(CURRENT_SIZE) -gt $(MAX_SIZE) ]; then \ @@ -412,7 +416,7 @@ check-size: fi else check-size: - echo "(Firmware size check does not yet support $(MCU) microprocessors; skipping.)" + $(SILENT) || echo "(Firmware size check does not yet support $(MCU) microprocessors; skipping.)" endif # Create build directory