aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudar <sudar@sudarmuthu.com>2013-06-15 15:34:10 +0530
committerSudar <sudar@sudarmuthu.com>2013-06-15 19:14:16 +0530
commit93eaaec5ba20314318a77f63711ae9054a70eaaa (patch)
tree02025fe1042e10b58b6557af4b2146eea6d32a93
parentad417dbf700be56bd70521b9a85acba9fa4d0ff8 (diff)
Add a warning when HEX_MAXIMUM_SIZE is not specified
-rw-r--r--HISTORY.md1
-rw-r--r--arduino-mk/Arduino.mk8
2 files changed, 7 insertions, 2 deletions
diff --git a/HISTORY.md b/HISTORY.md
index 1177d6e..4330964 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -6,6 +6,7 @@ The following is the rough list of changes that went into different versions. I
### 0.11.0 (in development)
- Replace hardcoded executables with variable
- Fix whitespace issues
+- Add a warning when HEX_MAXIMUM_SIZE is not specified
### 0.10.6 (2013-06-14)
- Fix whitespace and add /dev/null redirection (https://github.com/sej7278)
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk
index ccd2d95..8800bde 100644
--- a/arduino-mk/Arduino.mk
+++ b/arduino-mk/Arduino.mk
@@ -926,8 +926,12 @@ symbol_sizes: $(OBJDIR)/$(TARGET).sym
@$(ECHO) A symbol listing sorted by their size have been dumped to $(OBJDIR)/$(TARGET).sym
$(TARGET_HEX).sizeok: $(TARGET_HEX)
- $(ARDMK_PATH)/ard-verify-size $(TARGET_HEX) $(HEX_MAXIMUM_SIZE)
- touch $@
+ifneq ($(strip $(HEX_MAXIMUM_SIZE)),)
+ $(ARDMK_PATH)/ard-verify-size $(TARGET_HEX) $(HEX_MAXIMUM_SIZE)
+ touch $@
+else
+ @$(ECHO) Maximum Hex size is not specified. Make sure the hex file that you are going to upload is less than microcontrollers flash memory
+endif
verify_size: $(TARGET_HEX) $(TARGET_HEX).sizeok