Project

General

Profile

Revision 1472

updating RAM check to work with linux

View differences:

trunk/code/projects/test/Makefile
358 358
AVRMEM = avr-mem.sh $(TARGET).elf $(MCU)
359 359

  
360 360
# check RAM size (make sure under 4 kB)
361
DATASIZE = avr-size -A main.elf | grep 'data' | gawk '{ print $$2 }' > 1.tmp
362
BSSSIZE = avr-size -A main.elf | grep 'bss' | gawk '{ print $$2 }' > 2.tmp
361
AWK = $(shell if uname -s |grep -i w32 >/dev/null; then echo 'gawk:'; else echo 'awk'; fi)
362
DATASIZE = avr-size -A main.elf | grep 'data' | $(AWK) '{ print $$2 }' > 1.tmp
363
BSSSIZE = avr-size -A main.elf | grep 'bss' | $(AWK) '{ print $$2 }' > 2.tmp
363 364
ADD = expr `cat 1.tmp` + `cat 2.tmp` > 3.tmp
364 365
CLEANSIZE = rm 1.tmp 2.tmp 3.tmp
365 366
checksize:

Also available in: Unified diff