diff options
author | fauxpark <fauxpark@gmail.com> | 2019-07-12 05:05:13 +1000 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2019-07-16 13:03:12 +0900 |
commit | 16a8150de393a6d067ac7af6f55943ac2b959bf0 (patch) | |
tree | 79d3aadee03d7d667858d1715993f90035e83b50 /tmk_core/rules.mk | |
parent | dd148c595ce91944b8e2a72a2c449cd854c4c42b (diff) |
Display firmware size percentage (#6307)
Diffstat (limited to 'tmk_core/rules.mk')
-rw-r--r-- | tmk_core/rules.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 8f876a383c..96b6e3a271 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -398,6 +398,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 \ |