From d89b86d3bf44981e172b85139baff8d34f10033c Mon Sep 17 00:00:00 2001 From: Simen Svale Skogsrud Date: Fri, 14 Jan 2011 19:17:06 +0100 Subject: [PATCH] determined the SRAM requirements as part of the build process (requires ruby) --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 4f824e0..abee769 100644 --- a/Makefile +++ b/Makefile @@ -79,6 +79,7 @@ main.elf: $(OBJECTS) grbl.hex: main.elf rm -f grbl.hex avr-objcopy -j .text -j .data -O ihex main.elf grbl.hex + avr-objdump -h main.elf | grep .bss | ruby -e 'puts "\n\n--- Requires %s bytes of SRAM" % STDIN.read.match(/0[0-9a-f]+\s/)[0].to_i(16)' avr-size *.hex *.elf *.o # If you have an EEPROM section, you must also create a hex file for the # EEPROM and add it to the "flash" target.