Update Makefile

Makefile updated to calculate elf size correctly
This commit is contained in:
Niel Nielsen
2021-02-02 14:21:12 +01:00
committed by GitHub
parent e873206fb4
commit 5845b7bba9
+1 -1
View File
@@ -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"; \