diff --git a/Bootloaders/CDC/makefile b/Bootloaders/CDC/makefile
index 346912c64a3c532e234591df9e4e667b71f3a2a9..abc7c82a3754d247c0dce26617ae2802a45a648a 100644
--- a/Bootloaders/CDC/makefile
+++ b/Bootloaders/CDC/makefile
@@ -494,7 +494,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Bootloaders/DFU/makefile b/Bootloaders/DFU/makefile
index deb53125fc94f21ee218c970695e3e192ffcc51b..f6178b5e532ca979a5050d0007e269a2d39219c4 100644
--- a/Bootloaders/DFU/makefile
+++ b/Bootloaders/DFU/makefile
@@ -495,7 +495,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/AudioInput/makefile b/Demos/Device/ClassDriver/AudioInput/makefile
index afe72493214adea37cb9ded36e9bd7e27c54e74e..0df14ea4464505b800ccf021a55d8ee89f60659a 100644
--- a/Demos/Device/ClassDriver/AudioInput/makefile
+++ b/Demos/Device/ClassDriver/AudioInput/makefile
@@ -492,7 +492,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/AudioOutput/makefile b/Demos/Device/ClassDriver/AudioOutput/makefile
index ed56f897e2e67e696d7af2687c32ebfeb1bd46f1..110a9c4b6b6026c60115502aa19d2f9a25edb1ba 100644
--- a/Demos/Device/ClassDriver/AudioOutput/makefile
+++ b/Demos/Device/ClassDriver/AudioOutput/makefile
@@ -494,7 +494,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/makefile b/Demos/Device/ClassDriver/DualVirtualSerial/makefile
index acb74e82e7597c2532cef9fbfa57231e78bdda52..a3e1ea70247183442bd26130de9c57c93442b3e2 100644
--- a/Demos/Device/ClassDriver/DualVirtualSerial/makefile
+++ b/Demos/Device/ClassDriver/DualVirtualSerial/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/GenericHID/makefile b/Demos/Device/ClassDriver/GenericHID/makefile
index 8e1b067cf527ea2e710f6ca21c5b7f6cefffc597..2a445ea8f2ae7d788151e2522accf3483988ccc6 100644
--- a/Demos/Device/ClassDriver/GenericHID/makefile
+++ b/Demos/Device/ClassDriver/GenericHID/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/Joystick/makefile b/Demos/Device/ClassDriver/Joystick/makefile
index 7c70ec0cd36284417529cd568ea7951d7dd0509e..b9df6f67cb7b80cbea093b6d1889373bfc23ffd9 100644
--- a/Demos/Device/ClassDriver/Joystick/makefile
+++ b/Demos/Device/ClassDriver/Joystick/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/Keyboard/makefile b/Demos/Device/ClassDriver/Keyboard/makefile
index ebd5b029a6939bb1b3ada19c7d633a23b6b06428..0a89c9b932835e370012e4e141c00db4b5abcc06 100644
--- a/Demos/Device/ClassDriver/Keyboard/makefile
+++ b/Demos/Device/ClassDriver/Keyboard/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/KeyboardMouse/makefile b/Demos/Device/ClassDriver/KeyboardMouse/makefile
index 5955304fb65d84a21b5ae48179d97d41d63cec17..61565c92914dd90e3bf2264a2a846ce8ab2e0733 100644
--- a/Demos/Device/ClassDriver/KeyboardMouse/makefile
+++ b/Demos/Device/ClassDriver/KeyboardMouse/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/MIDI/makefile b/Demos/Device/ClassDriver/MIDI/makefile
index fac283b3119a9625602ba94a58cf9c876bc6c946..25219a8ff5dc204c1923af9b1763bf3da2aad893 100644
--- a/Demos/Device/ClassDriver/MIDI/makefile
+++ b/Demos/Device/ClassDriver/MIDI/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/MassStorage/makefile b/Demos/Device/ClassDriver/MassStorage/makefile
index 5c9fe05718708982c389a474ab1f80043b75ed5d..7979c1e4c8ec95e82f48e8a5382dcb294a88ffa5 100644
--- a/Demos/Device/ClassDriver/MassStorage/makefile
+++ b/Demos/Device/ClassDriver/MassStorage/makefile
@@ -493,7 +493,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/makefile b/Demos/Device/ClassDriver/MassStorageKeyboard/makefile
index 723dd91d602f20496ca52d39b0c0d606de743f62..d60f30eb807c47b66daddf92a5adf5ed8c064b0a 100644
--- a/Demos/Device/ClassDriver/MassStorageKeyboard/makefile
+++ b/Demos/Device/ClassDriver/MassStorageKeyboard/makefile
@@ -493,7 +493,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/Mouse/makefile b/Demos/Device/ClassDriver/Mouse/makefile
index d202a6a8cf2f6e93d85aab9362920f8d444bda7d..0f84f740b090572b258e47616c3458019f0f69b7 100644
--- a/Demos/Device/ClassDriver/Mouse/makefile
+++ b/Demos/Device/ClassDriver/Mouse/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/makefile b/Demos/Device/ClassDriver/RNDISEthernet/makefile
index c3650e9dad10adf4ab0c00d973188bed2277eecd..1c48d94e982eccc7c14949a8ea7c6b41b5228889 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/makefile
+++ b/Demos/Device/ClassDriver/RNDISEthernet/makefile
@@ -509,7 +509,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/VirtualSerial/makefile b/Demos/Device/ClassDriver/VirtualSerial/makefile
index 18c3be52fe840c394a4c1e9d7d4edcf2701eb543..bfd5c4884e646d9c405c100a1090c2bd60bdc495 100644
--- a/Demos/Device/ClassDriver/VirtualSerial/makefile
+++ b/Demos/Device/ClassDriver/VirtualSerial/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/makefile b/Demos/Device/ClassDriver/VirtualSerialMouse/makefile
index 04141a50f34fb1248f3e0908df169298bcb2eee0..dd8cf19b540b42d7b2f3add06cb918134a782f40 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMouse/makefile
+++ b/Demos/Device/ClassDriver/VirtualSerialMouse/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/Incomplete/Sideshow/makefile b/Demos/Device/Incomplete/Sideshow/makefile
index 1565b991e122f56640d84b7ad9d6107a4a6e4f52..7e09f23b9fddee35ead54469cb7e3c17bee34b60 100644
--- a/Demos/Device/Incomplete/Sideshow/makefile
+++ b/Demos/Device/Incomplete/Sideshow/makefile
@@ -496,7 +496,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
index cab978a854aaaf4a10e96841f1b1d90e41a1e70c..040cb345d8e87d77d38d49579355444495ce3368 100644
--- a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
+++ b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
@@ -332,7 +332,7 @@ void TMC_Task(void)
 	
 	TMC_MessageHeader_t MessageHeader;
 	
-	/* Check if a TMC packet has been received */
+	/* Try to read in a TMC message from the interface, process if one is available */
 	if (ReadTMCHeader(&MessageHeader))
 	{
 		/* Indicate busy */
@@ -366,6 +366,12 @@ void TMC_Task(void)
 	IsTMCBulkOUTReset = false;
 }
 
+/** Attempts to read in the TMC message header from the TMC interface.
+ *
+ *  \param[out] MessageHeader  Pointer to a location where the read header (if any) should be stored
+ *
+ *  \return Boolean true if a header was read, false otherwise
+ */
 bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader)
 {
 	/* Select the Data Out endpoint */
@@ -382,7 +388,7 @@ bool ReadTMCHeader(TMC_MessageHeader_t* const MessageHeader)
 	CurrentTransferTag = MessageHeader->Tag;
 	
 	/* Indicate if the command has been aborted or not */
-	return !IsTMCBulkOUTReset;
+	return !(IsTMCBulkOUTReset);
 }
 
 bool WriteTMCHeader(TMC_MessageHeader_t* const MessageHeader)
@@ -402,7 +408,7 @@ bool WriteTMCHeader(TMC_MessageHeader_t* const MessageHeader)
 	Endpoint_Write_Stream_LE(MessageHeader, sizeof(TMC_MessageHeader_t), StreamCallback_AbortINOnRequest);
 
 	/* Indicate if the command has been aborted or not */
-	return !IsTMCBulkINReset;
+	return !(IsTMCBulkINReset);
 }
 
 /** Stream callback function for the Endpoint stream write functions. This callback will abort the current stream transfer
diff --git a/Demos/Device/Incomplete/TestAndMeasurement/makefile b/Demos/Device/Incomplete/TestAndMeasurement/makefile
index 94e697eaed5af1bcc18da29e81399775e9e1e5b6..3351364b1e6f83199cf8d86e9362fd90ffe04a98 100644
--- a/Demos/Device/Incomplete/TestAndMeasurement/makefile
+++ b/Demos/Device/Incomplete/TestAndMeasurement/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/AudioInput/makefile b/Demos/Device/LowLevel/AudioInput/makefile
index dc7fa47ee2b7c4ed83b3828226595c28d00ea530..27ae109e1488d073b441d179afee77368c0c12c1 100644
--- a/Demos/Device/LowLevel/AudioInput/makefile
+++ b/Demos/Device/LowLevel/AudioInput/makefile
@@ -491,7 +491,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/AudioOutput/makefile b/Demos/Device/LowLevel/AudioOutput/makefile
index 9e61803e7729226dcd8cd3b81f7c0ca1e8b86921..c8dcbd298f154075f63b729f513741bb13b8495a 100644
--- a/Demos/Device/LowLevel/AudioOutput/makefile
+++ b/Demos/Device/LowLevel/AudioOutput/makefile
@@ -493,7 +493,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/makefile b/Demos/Device/LowLevel/DualVirtualSerial/makefile
index c9f49a5590af7b9141e145cfe7cdadb56298bdd0..2ee5ac6e2285450200401c0ab1f943f595556127 100644
--- a/Demos/Device/LowLevel/DualVirtualSerial/makefile
+++ b/Demos/Device/LowLevel/DualVirtualSerial/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/GenericHID/makefile b/Demos/Device/LowLevel/GenericHID/makefile
index abf34759384a783175f9a73886eb1afa8d268b6b..547f666b3233ef988f0d0fe6cd19ab25c1397d16 100644
--- a/Demos/Device/LowLevel/GenericHID/makefile
+++ b/Demos/Device/LowLevel/GenericHID/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/Joystick/makefile b/Demos/Device/LowLevel/Joystick/makefile
index 329163ee8e159d3aa5a20c1570ff65bab438eec6..7037ec6774e2e32caecbbf483b75e60581dad992 100644
--- a/Demos/Device/LowLevel/Joystick/makefile
+++ b/Demos/Device/LowLevel/Joystick/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/Keyboard/makefile b/Demos/Device/LowLevel/Keyboard/makefile
index 00892d9d81eb002619c226e77946259d13b0907a..eb48a2424aed589ec7b4bfe732793e24a529374f 100644
--- a/Demos/Device/LowLevel/Keyboard/makefile
+++ b/Demos/Device/LowLevel/Keyboard/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/KeyboardMouse/makefile b/Demos/Device/LowLevel/KeyboardMouse/makefile
index eeee41e068043a5d054881c02f72177ad8a37467..e92fb23a7e8537c167e32553d3e2a14cfc1325a0 100644
--- a/Demos/Device/LowLevel/KeyboardMouse/makefile
+++ b/Demos/Device/LowLevel/KeyboardMouse/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/MIDI/makefile b/Demos/Device/LowLevel/MIDI/makefile
index 308933252cf2edad656b29df5f937f8053d8fde6..92fd685198c3e8694c78fc434fa3284e23344543 100644
--- a/Demos/Device/LowLevel/MIDI/makefile
+++ b/Demos/Device/LowLevel/MIDI/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/MassStorage/makefile b/Demos/Device/LowLevel/MassStorage/makefile
index e1447cea2b45dd09c44221fae8efb4edb8e91d28..4e8dd8c4db7d97745f17198f916497ddea49e2b6 100644
--- a/Demos/Device/LowLevel/MassStorage/makefile
+++ b/Demos/Device/LowLevel/MassStorage/makefile
@@ -492,7 +492,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/Mouse/makefile b/Demos/Device/LowLevel/Mouse/makefile
index 744da6b5ab12b924cc14c1f6e6cb480e98592ba0..348afedbd4d470eeef70bfff77459ddb2fcab443 100644
--- a/Demos/Device/LowLevel/Mouse/makefile
+++ b/Demos/Device/LowLevel/Mouse/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/RNDISEthernet/makefile b/Demos/Device/LowLevel/RNDISEthernet/makefile
index 3e57640f7e421708005b70be07552207c5168f04..8adb5312e03d89881b96044c018c4c4fee969780 100644
--- a/Demos/Device/LowLevel/RNDISEthernet/makefile
+++ b/Demos/Device/LowLevel/RNDISEthernet/makefile
@@ -510,7 +510,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Device/LowLevel/VirtualSerial/makefile b/Demos/Device/LowLevel/VirtualSerial/makefile
index c0d989e879997546280264909b648975b6b86481..41cb02a1fbc28a7f881487834581c0e8a8a53e57 100644
--- a/Demos/Device/LowLevel/VirtualSerial/makefile
+++ b/Demos/Device/LowLevel/VirtualSerial/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/makefile b/Demos/DualRole/ClassDriver/MouseHostDevice/makefile
index 79ab4f4f159c52b942f517276059e270fe04fc0d..cdaf43d7f74dc19d3ae54105106f62e5fe83518f 100644
--- a/Demos/DualRole/ClassDriver/MouseHostDevice/makefile
+++ b/Demos/DualRole/ClassDriver/MouseHostDevice/makefile
@@ -493,7 +493,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/makefile b/Demos/Host/ClassDriver/JoystickHostWithParser/makefile
index 3d408ae6a911bec3e4165d415fcde8fd49bf730e..2d353d6a64ce38426aa899bf5c09d9128cdf2bd1 100644
--- a/Demos/Host/ClassDriver/JoystickHostWithParser/makefile
+++ b/Demos/Host/ClassDriver/JoystickHostWithParser/makefile
@@ -488,7 +488,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/ClassDriver/KeyboardHost/makefile b/Demos/Host/ClassDriver/KeyboardHost/makefile
index e93721194bd76c5c0867980d67181d1430214c7a..1931bc4661ed77258f21b855c2d376e4041bbe54 100644
--- a/Demos/Host/ClassDriver/KeyboardHost/makefile
+++ b/Demos/Host/ClassDriver/KeyboardHost/makefile
@@ -488,7 +488,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/makefile b/Demos/Host/ClassDriver/KeyboardHostWithParser/makefile
index d5325bb3ee8b5e0085b54619bf7e5ade2193e145..775d970182e6ad29b1c5e7e3f5e175da0e71b54a 100644
--- a/Demos/Host/ClassDriver/KeyboardHostWithParser/makefile
+++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/makefile
@@ -488,7 +488,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/ClassDriver/MIDIHost/makefile b/Demos/Host/ClassDriver/MIDIHost/makefile
index c2a987e0e63e792ef7cd68deea4c0bc3550a5643..451a9081b6aa5cca0149c6e7b39cc1dfe02b13b3 100644
--- a/Demos/Host/ClassDriver/MIDIHost/makefile
+++ b/Demos/Host/ClassDriver/MIDIHost/makefile
@@ -488,7 +488,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/ClassDriver/MassStorageHost/makefile b/Demos/Host/ClassDriver/MassStorageHost/makefile
index e8ccd7bea8a5bca1a69f0f28d4817103a9c2c94c..44115faf0ce82de1bcbe7d3acfaecb53b68bd84e 100644
--- a/Demos/Host/ClassDriver/MassStorageHost/makefile
+++ b/Demos/Host/ClassDriver/MassStorageHost/makefile
@@ -489,7 +489,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/ClassDriver/MouseHost/makefile b/Demos/Host/ClassDriver/MouseHost/makefile
index f12dd8874e46916c8379f7bc88d891ad75af66e7..c5d29edccf34b23bd3bc46a8af6f8ded4073b142 100644
--- a/Demos/Host/ClassDriver/MouseHost/makefile
+++ b/Demos/Host/ClassDriver/MouseHost/makefile
@@ -488,7 +488,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/makefile b/Demos/Host/ClassDriver/MouseHostWithParser/makefile
index ecbdc2f6f69b9589e4ab1153b51cc3df7fff61c4..aa4bf7a4f12ab0b395aa1d001ea6d3362ffe2d24 100644
--- a/Demos/Host/ClassDriver/MouseHostWithParser/makefile
+++ b/Demos/Host/ClassDriver/MouseHostWithParser/makefile
@@ -488,7 +488,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/ClassDriver/PrinterHost/makefile b/Demos/Host/ClassDriver/PrinterHost/makefile
index 3434ad5d9b2bbf1bcc84baae133194580045ab6a..60ecddd6694075dec1b6e1f0a6ed241791c830b2 100644
--- a/Demos/Host/ClassDriver/PrinterHost/makefile
+++ b/Demos/Host/ClassDriver/PrinterHost/makefile
@@ -488,7 +488,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/makefile b/Demos/Host/ClassDriver/RNDISEthernetHost/makefile
index 3f1b082f141186433e03bf32a2a89ab2780ad464..05d56d67b60f3acda38a9269377f79a183ddb312 100644
--- a/Demos/Host/ClassDriver/RNDISEthernetHost/makefile
+++ b/Demos/Host/ClassDriver/RNDISEthernetHost/makefile
@@ -488,7 +488,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/ClassDriver/StillImageHost/makefile b/Demos/Host/ClassDriver/StillImageHost/makefile
index f34358f127f403868e7e046083f691152ab31211..4efef10d19b54daf91974dfb1868fc306d778e99 100644
--- a/Demos/Host/ClassDriver/StillImageHost/makefile
+++ b/Demos/Host/ClassDriver/StillImageHost/makefile
@@ -488,7 +488,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/makefile b/Demos/Host/ClassDriver/VirtualSerialHost/makefile
index 6399d2da003096b003c3c78f960ae82d59537724..d16e8320e05b1f1e1349a278548a2a8fc7cf3bda 100644
--- a/Demos/Host/ClassDriver/VirtualSerialHost/makefile
+++ b/Demos/Host/ClassDriver/VirtualSerialHost/makefile
@@ -488,7 +488,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/Incomplete/BluetoothHost/makefile b/Demos/Host/Incomplete/BluetoothHost/makefile
index 50de5a14962f44b0a3e120ace6039a50a01c0c92..ae632ff59ab0bfb6f4d105e9bcf4993affcbb3d2 100644
--- a/Demos/Host/Incomplete/BluetoothHost/makefile
+++ b/Demos/Host/Incomplete/BluetoothHost/makefile
@@ -498,7 +498,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/LowLevel/GenericHIDHost/makefile b/Demos/Host/LowLevel/GenericHIDHost/makefile
index d8fcddf7769e69a0b0dfcc04e017ee50ff584dad..e9dbab5a2fe172e5113bf0f60c4939d4c3c526b8 100644
--- a/Demos/Host/LowLevel/GenericHIDHost/makefile
+++ b/Demos/Host/LowLevel/GenericHIDHost/makefile
@@ -489,7 +489,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/makefile b/Demos/Host/LowLevel/JoystickHostWithParser/makefile
index b9a82370e56cfe9255a8411a1c28df28db71d70e..a56fdf280191938130d88c78ca9dd4a070f19a32 100644
--- a/Demos/Host/LowLevel/JoystickHostWithParser/makefile
+++ b/Demos/Host/LowLevel/JoystickHostWithParser/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/LowLevel/KeyboardHost/makefile b/Demos/Host/LowLevel/KeyboardHost/makefile
index 877f0e2ea935e73e427a962527f19ccd42f6f43d..02b19f9149d409f40c6683668d9576a286800ce8 100644
--- a/Demos/Host/LowLevel/KeyboardHost/makefile
+++ b/Demos/Host/LowLevel/KeyboardHost/makefile
@@ -489,7 +489,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/makefile b/Demos/Host/LowLevel/KeyboardHostWithParser/makefile
index a100eeafea3bfb11c804a9ecd36b0faf1bbcc598..ded32f8e0e6338b4f18f8a64d810e81cb91ae2d5 100644
--- a/Demos/Host/LowLevel/KeyboardHostWithParser/makefile
+++ b/Demos/Host/LowLevel/KeyboardHostWithParser/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/LowLevel/MIDIHost/makefile b/Demos/Host/LowLevel/MIDIHost/makefile
index 27b899fd33cbabc4b3aae3554b85946af43fa69f..ca8f993323ccd97dc4b2a9b0baa12664bdc57beb 100644
--- a/Demos/Host/LowLevel/MIDIHost/makefile
+++ b/Demos/Host/LowLevel/MIDIHost/makefile
@@ -489,7 +489,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/LowLevel/MassStorageHost/makefile b/Demos/Host/LowLevel/MassStorageHost/makefile
index 3728b760e402944bd30b6199a703173494bf56e0..a17934d1e54b2ddd446526906325deccaf5a0622 100644
--- a/Demos/Host/LowLevel/MassStorageHost/makefile
+++ b/Demos/Host/LowLevel/MassStorageHost/makefile
@@ -491,7 +491,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/LowLevel/MouseHost/makefile b/Demos/Host/LowLevel/MouseHost/makefile
index 5aeaf8721d80c497632a130b0eff48820b61b38d..a6a2183021c027003817932be738d9479472ece5 100644
--- a/Demos/Host/LowLevel/MouseHost/makefile
+++ b/Demos/Host/LowLevel/MouseHost/makefile
@@ -489,7 +489,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/LowLevel/MouseHostWithParser/makefile b/Demos/Host/LowLevel/MouseHostWithParser/makefile
index 84a5f728ca4e4408ff45c56ae86139f528e52239..0c882582c93ca0a1728d0b87323dec7922457dd1 100644
--- a/Demos/Host/LowLevel/MouseHostWithParser/makefile
+++ b/Demos/Host/LowLevel/MouseHostWithParser/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/LowLevel/PrinterHost/makefile b/Demos/Host/LowLevel/PrinterHost/makefile
index 66efd03e21d8577d911f54c79991e39fd02f706f..f8698cf0d48cbb6b3aa69af0f18d71a484505d61 100644
--- a/Demos/Host/LowLevel/PrinterHost/makefile
+++ b/Demos/Host/LowLevel/PrinterHost/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/makefile b/Demos/Host/LowLevel/RNDISEthernetHost/makefile
index 06aed481fb1c907212eda9922d1f3b46b978adce..98faa8238715355e32d6e1a29f4b382af0a14a87 100644
--- a/Demos/Host/LowLevel/RNDISEthernetHost/makefile
+++ b/Demos/Host/LowLevel/RNDISEthernetHost/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/LowLevel/StillImageHost/makefile b/Demos/Host/LowLevel/StillImageHost/makefile
index de242d8e657d94c0856a18c7746b3dbdf4e65065..4434d76087bd19467f63d7107e915dd505b5aa9c 100644
--- a/Demos/Host/LowLevel/StillImageHost/makefile
+++ b/Demos/Host/LowLevel/StillImageHost/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/makefile b/Demos/Host/LowLevel/VirtualSerialHost/makefile
index 6e15fafa776af47330a10d377756ccca457be119..d3842011514eabb6bddd0d2b6d66d865b76f80a0 100644
--- a/Demos/Host/LowLevel/VirtualSerialHost/makefile
+++ b/Demos/Host/LowLevel/VirtualSerialHost/makefile
@@ -489,7 +489,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Projects/AVRISP-MKII/makefile b/Projects/AVRISP-MKII/makefile
index 8b120da33e7df4b6b4300d39bd7ae20541bb9656..ca203fe29ca65fafa88d3c421c4b99c68eeccd5a 100644
--- a/Projects/AVRISP-MKII/makefile
+++ b/Projects/AVRISP-MKII/makefile
@@ -513,7 +513,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Projects/Benito/makefile b/Projects/Benito/makefile
index 3e0311e8931f3c6a615832f19fe55a6c922fdd2e..d8babd86b7dd0d75f1e1f00d0a6aa1111fafd8a2 100644
--- a/Projects/Benito/makefile
+++ b/Projects/Benito/makefile
@@ -498,7 +498,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Projects/Incomplete/MIDIToneGenerator/makefile b/Projects/Incomplete/MIDIToneGenerator/makefile
index 3360a4e8bac5d39ecd19eda6e1564b59f4798c60..5c73b279b792474d94b1cf7012f3a2e1364ad0b0 100644
--- a/Projects/Incomplete/MIDIToneGenerator/makefile
+++ b/Projects/Incomplete/MIDIToneGenerator/makefile
@@ -493,7 +493,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Projects/Incomplete/StandaloneProgrammer/makefile b/Projects/Incomplete/StandaloneProgrammer/makefile
index 6bf5f056ca57cf4f7fca4add0ee56cd9aaeb2c04..b0409d45689ba671fae8a7c8484f46656a513503 100644
--- a/Projects/Incomplete/StandaloneProgrammer/makefile
+++ b/Projects/Incomplete/StandaloneProgrammer/makefile
@@ -499,7 +499,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Projects/LEDNotifier/makefile b/Projects/LEDNotifier/makefile
index 0ac1d866ac8e6da1e658f1e3bdf8eb4a18e18dc3..5075f23713a45005a6831d227440d3c0dd9b9a0b 100644
--- a/Projects/LEDNotifier/makefile
+++ b/Projects/LEDNotifier/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Projects/Magstripe/makefile b/Projects/Magstripe/makefile
index 60fa362a23bed6def2e4d7bdd8800846554b41b8..f97be4d77310d07bbe1f18e9736f45ac811547a1 100644
--- a/Projects/Magstripe/makefile
+++ b/Projects/Magstripe/makefile
@@ -502,7 +502,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Projects/MissileLauncher/makefile b/Projects/MissileLauncher/makefile
index 1a7ab81e4e92b82874292202c3ad540d45d7e1d1..5f59b451307f164c8a0d8a14738430b3f74150e8 100644
--- a/Projects/MissileLauncher/makefile
+++ b/Projects/MissileLauncher/makefile
@@ -487,7 +487,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Projects/RelayBoard/makefile b/Projects/RelayBoard/makefile
index 6f3d08efd4d56132e102bbddb57b8dd8fde25119..f4f451765219a7977e58f26a23f6f4140afd4594 100644
--- a/Projects/RelayBoard/makefile
+++ b/Projects/RelayBoard/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Projects/TempDataLogger/makefile b/Projects/TempDataLogger/makefile
index 06f09546375ef728a965e4b99586c0801fec039c..6644cba595fa1783de16cd8e72a576e04d8a420a 100644
--- a/Projects/TempDataLogger/makefile
+++ b/Projects/TempDataLogger/makefile
@@ -501,7 +501,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Projects/USBtoSerial/makefile b/Projects/USBtoSerial/makefile
index dfa2c99dd1fdfeb1da1fc1db61ef4bfd35d385df..a87f303206a291748117250827ab39401a5dab22 100644
--- a/Projects/USBtoSerial/makefile
+++ b/Projects/USBtoSerial/makefile
@@ -490,7 +490,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Projects/Webserver/makefile b/Projects/Webserver/makefile
index 877b9261f9df5936b371178bc31bc8f82a39808e..ed4e532aa7f64513ca10814fc19fc9a93068a06c 100644
--- a/Projects/Webserver/makefile
+++ b/Projects/Webserver/makefile
@@ -525,7 +525,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
diff --git a/Projects/XPLAINBridge/makefile b/Projects/XPLAINBridge/makefile
index 03502db586811b7aacaa00eb086bcef159804c99..810f9e7699252f970e892de617a1494a87fd1e7d 100644
--- a/Projects/XPLAINBridge/makefile
+++ b/Projects/XPLAINBridge/makefile
@@ -516,7 +516,10 @@ end:
 
 # Display size of file.
 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
+MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
+FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
+
 
 sizebefore:
 	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \