From 5845b7bba9071fbe0a7d96bd89de3e65f40a3b77 Mon Sep 17 00:00:00 2001 From: Niel Nielsen Date: Tue, 2 Feb 2021 14:21:12 +0100 Subject: [PATCH] Update Makefile Makefile updated to calculate elf size correctly --- Firmware/Chameleon-Mini/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/Chameleon-Mini/Makefile b/Firmware/Chameleon-Mini/Makefile index e2bf8d3d..f3b0918b 100644 --- a/Firmware/Chameleon-Mini/Makefile +++ b/Firmware/Chameleon-Mini/Makefile @@ -193,7 +193,7 @@ check_size: if [ ! -f $(TARGET).elf ]; then \ exit 0; \ fi; \ - PROGMEM_SIZE=$$(avr-size $(TARGET).elf | grep -oP "\d+" | sed -n 4p); \ + PROGMEM_SIZE=$$(avr-size --format=avr $(TARGET).elf | grep -oP "\d+" | sed -n 3p); \ MAX_PRGMEM_SIZE=$$(printf "%d\n" $(FLASH_DATA_ADDR)); \ if [ $$PROGMEM_SIZE -gt $$MAX_PRGMEM_SIZE ]; then \ echo "make: *** $(TARGET).elf Application Section size $$PROGMEM_SIZE excedes maximum allowed $$MAX_PRGMEM_SIZE. Please disable some features in Makefile"; \