From f8200c864390a78d41a1c0c5fc6b41e147055114 Mon Sep 17 00:00:00 2001 From: thalesmaoa Date: Mon, 29 Feb 2016 20:31:23 -0300 Subject: [PATCH] Update Arduino.mk --- Arduino.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Arduino.mk b/Arduino.mk index 322ca38..613e1a9 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -697,6 +697,13 @@ ifeq ($(strip $(NO_CORE)),) endif endif + +ifndef HEX_MAXIMUM_SIZE + HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG),menu.cpu.$(BOARD_SUB).upload.maximum_size) + ifndef HEX_MAXIMUM_SIZE + HEX_MAXIMUM_SIZE := $(call PARSE_BOARD,$(BOARD_TAG),upload.maximum_size) + endif +endif # Everything gets built in here (include BOARD_TAG now) ifndef OBJDIR @@ -1260,7 +1267,7 @@ $(OBJDIR)/%.hex: $(OBJDIR)/%.elf $(COMMON_DEPS) ifneq ($(strip $(HEX_MAXIMUM_SIZE)),) @if [ `$(SIZE) $@ | awk 'FNR == 2 {print $$2}'` -le $(HEX_MAXIMUM_SIZE) ]; then touch $@.sizeok; fi else - @$(ECHO) "Maximum flash memory of $(BOARD_TAG) is not specified. Make sure the size of $@ is less than $(BOARD_TAG)\'s flash memory" + @$(ECHO) "Maximum flash memory of $(BOARD_TAG) is not specified. Make sure the size of $@ is less than $(BOARD_TAG)\'s flash memory\n\n" @touch $@.sizeok endif