summaryrefslogtreecommitdiff
path: root/tmk_core/rules.mk
diff options
context:
space:
mode:
authora_p_u_r_o <applause@elfmimi.jp>2019-11-24 01:01:03 +0900
committerFlorian Didron <fdidron@users.noreply.github.com>2020-01-06 12:21:46 +0900
commitbf09fa6148f4e531d3c201d5a761b84cabf4f197 (patch)
tree2eaa4a653a2220a6585eedb6657fb71dd3c5f605 /tmk_core/rules.mk
parent2fe7d6aea2e2ae2da7d0a41266a2084f8c8ca919 (diff)
Remove CR when computing BOOTLOADER_SIZE. (#7453)
Diffstat (limited to 'tmk_core/rules.mk')
-rw-r--r--tmk_core/rules.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index 31bce33c39..334ff314be 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -397,7 +397,7 @@ ifeq ($(findstring avr-gcc,$(CC)),avr-gcc)
SIZE_MARGIN = 1024
check-size:
- $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne '/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))
+ $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))
$(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)))