From 5f3a1b262970f7423bc83a2f6eabcd1d4d7c65af Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 8 Aug 2010 08:30:42 +0000 Subject: [PATCH] Fix invocations of avr-size in all makefiles broken on unpatched *nix systems, due to the recent update to the latest WinAVR makefile template. --- Bootloaders/CDC/makefile | 5 ++++- Bootloaders/DFU/makefile | 5 ++++- Demos/Device/ClassDriver/AudioInput/makefile | 5 ++++- Demos/Device/ClassDriver/AudioOutput/makefile | 5 ++++- Demos/Device/ClassDriver/DualVirtualSerial/makefile | 5 ++++- Demos/Device/ClassDriver/GenericHID/makefile | 5 ++++- Demos/Device/ClassDriver/Joystick/makefile | 5 ++++- Demos/Device/ClassDriver/Keyboard/makefile | 5 ++++- Demos/Device/ClassDriver/KeyboardMouse/makefile | 5 ++++- Demos/Device/ClassDriver/MIDI/makefile | 5 ++++- Demos/Device/ClassDriver/MassStorage/makefile | 5 ++++- .../Device/ClassDriver/MassStorageKeyboard/makefile | 5 ++++- Demos/Device/ClassDriver/Mouse/makefile | 5 ++++- Demos/Device/ClassDriver/RNDISEthernet/makefile | 5 ++++- Demos/Device/ClassDriver/VirtualSerial/makefile | 5 ++++- Demos/Device/ClassDriver/VirtualSerialMouse/makefile | 5 ++++- Demos/Device/Incomplete/Sideshow/makefile | 5 ++++- .../TestAndMeasurement/TestAndMeasurement.c | 12 +++++++++--- Demos/Device/Incomplete/TestAndMeasurement/makefile | 5 ++++- Demos/Device/LowLevel/AudioInput/makefile | 5 ++++- Demos/Device/LowLevel/AudioOutput/makefile | 5 ++++- Demos/Device/LowLevel/DualVirtualSerial/makefile | 5 ++++- Demos/Device/LowLevel/GenericHID/makefile | 5 ++++- Demos/Device/LowLevel/Joystick/makefile | 5 ++++- Demos/Device/LowLevel/Keyboard/makefile | 5 ++++- Demos/Device/LowLevel/KeyboardMouse/makefile | 5 ++++- Demos/Device/LowLevel/MIDI/makefile | 5 ++++- Demos/Device/LowLevel/MassStorage/makefile | 5 ++++- Demos/Device/LowLevel/Mouse/makefile | 5 ++++- Demos/Device/LowLevel/RNDISEthernet/makefile | 5 ++++- Demos/Device/LowLevel/VirtualSerial/makefile | 5 ++++- Demos/DualRole/ClassDriver/MouseHostDevice/makefile | 5 ++++- .../Host/ClassDriver/JoystickHostWithParser/makefile | 5 ++++- Demos/Host/ClassDriver/KeyboardHost/makefile | 5 ++++- .../Host/ClassDriver/KeyboardHostWithParser/makefile | 5 ++++- Demos/Host/ClassDriver/MIDIHost/makefile | 5 ++++- Demos/Host/ClassDriver/MassStorageHost/makefile | 5 ++++- Demos/Host/ClassDriver/MouseHost/makefile | 5 ++++- Demos/Host/ClassDriver/MouseHostWithParser/makefile | 5 ++++- Demos/Host/ClassDriver/PrinterHost/makefile | 5 ++++- Demos/Host/ClassDriver/RNDISEthernetHost/makefile | 5 ++++- Demos/Host/ClassDriver/StillImageHost/makefile | 5 ++++- Demos/Host/ClassDriver/VirtualSerialHost/makefile | 5 ++++- Demos/Host/Incomplete/BluetoothHost/makefile | 5 ++++- Demos/Host/LowLevel/GenericHIDHost/makefile | 5 ++++- Demos/Host/LowLevel/JoystickHostWithParser/makefile | 5 ++++- Demos/Host/LowLevel/KeyboardHost/makefile | 5 ++++- Demos/Host/LowLevel/KeyboardHostWithParser/makefile | 5 ++++- Demos/Host/LowLevel/MIDIHost/makefile | 5 ++++- Demos/Host/LowLevel/MassStorageHost/makefile | 5 ++++- Demos/Host/LowLevel/MouseHost/makefile | 5 ++++- Demos/Host/LowLevel/MouseHostWithParser/makefile | 5 ++++- Demos/Host/LowLevel/PrinterHost/makefile | 5 ++++- Demos/Host/LowLevel/RNDISEthernetHost/makefile | 5 ++++- Demos/Host/LowLevel/StillImageHost/makefile | 5 ++++- Demos/Host/LowLevel/VirtualSerialHost/makefile | 5 ++++- Projects/AVRISP-MKII/makefile | 5 ++++- Projects/Benito/makefile | 5 ++++- Projects/Incomplete/MIDIToneGenerator/makefile | 5 ++++- Projects/Incomplete/StandaloneProgrammer/makefile | 5 ++++- Projects/LEDNotifier/makefile | 5 ++++- Projects/Magstripe/makefile | 5 ++++- Projects/MissileLauncher/makefile | 5 ++++- Projects/RelayBoard/makefile | 5 ++++- Projects/TempDataLogger/makefile | 5 ++++- Projects/USBtoSerial/makefile | 5 ++++- Projects/Webserver/makefile | 5 ++++- Projects/XPLAINBridge/makefile | 5 ++++- 68 files changed, 277 insertions(+), 70 deletions(-) diff --git a/Bootloaders/CDC/makefile b/Bootloaders/CDC/makefile index 346912c64a3..abc7c82a375 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 deb53125fc9..f6178b5e532 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 afe72493214..0df14ea4464 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 ed56f897e2e..110a9c4b6b6 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 acb74e82e75..a3e1ea70247 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 8e1b067cf52..2a445ea8f2a 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 7c70ec0cd36..b9df6f67cb7 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 ebd5b029a69..0a89c9b9328 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 5955304fb65..61565c92914 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 fac283b3119..25219a8ff5d 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 5c9fe057187..7979c1e4c8e 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 723dd91d602..d60f30eb807 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 d202a6a8cf2..0f84f740b09 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 c3650e9dad1..1c48d94e982 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 18c3be52fe8..bfd5c4884e6 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 04141a50f34..dd8cf19b540 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 1565b991e12..7e09f23b9fd 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 cab978a854a..040cb345d8e 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 94e697eaed5..3351364b1e6 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 dc7fa47ee2b..27ae109e148 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 9e61803e772..c8dcbd298f1 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 c9f49a5590a..2ee5ac6e228 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 abf34759384..547f666b323 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 329163ee8e1..7037ec6774e 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 00892d9d81e..eb48a2424ae 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 eeee41e0680..e92fb23a7e8 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 308933252cf..92fd685198c 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 e1447cea2b4..4e8dd8c4db7 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 744da6b5ab1..348afedbd4d 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 3e57640f7e4..8adb5312e03 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 c0d989e8799..41cb02a1fbc 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 79ab4f4f159..cdaf43d7f74 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 3d408ae6a91..2d353d6a64c 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 e93721194bd..1931bc4661e 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 d5325bb3ee8..775d970182e 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 c2a987e0e63..451a9081b6a 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 e8ccd7bea8a..44115faf0ce 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 f12dd8874e4..c5d29edccf3 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 ecbdc2f6f69..aa4bf7a4f12 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 3434ad5d9b2..60ecddd6694 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 3f1b082f141..05d56d67b60 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 f34358f127f..4efef10d19b 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 6399d2da003..d16e8320e05 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 50de5a14962..ae632ff59ab 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 d8fcddf7769..e9dbab5a2fe 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 b9a82370e56..a56fdf28019 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 877f0e2ea93..02b19f9149d 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 a100eeafea3..ded32f8e0e6 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 27b899fd33c..ca8f993323c 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 3728b760e40..a17934d1e54 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 5aeaf8721d8..a6a2183021c 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 84a5f728ca4..0c882582c93 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 66efd03e21d..f8698cf0d48 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 06aed481fb1..98faa823871 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 de242d8e657..4434d76087b 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 6e15fafa776..d3842011514 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 8b120da33e7..ca203fe29ca 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 3e0311e8931..d8babd86b7d 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 3360a4e8bac..5c73b279b79 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 6bf5f056ca5..b0409d45689 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 0ac1d866ac8..5075f23713a 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 60fa362a23b..f97be4d7731 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 1a7ab81e4e9..5f59b451307 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 6f3d08efd4d..f4f45176521 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 06f09546375..6644cba595f 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 dfa2c99dd1f..a87f303206a 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 877b9261f9d..ed4e532aa7f 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 03502db5868..810f9e76992 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); \