Project

General

Profile

Revision 1471

another modification to the RAM check

View differences:

Makefile
14 14
USE_WIRELESS = 1
15 15

  
16 16
# com1 = serial port. Use lpt1 to connect to parallel port.
17
AVRDUDE_PORT = $(shell if uname -s |grep -i w32 >/dev/null; then echo 'COM7:'; else echo '/dev/ttyUSB0'; fi)
17
AVRDUDE_PORT = $(shell if uname -s |grep -i w32 >/dev/null; then echo 'COM4:'; else echo '/dev/ttyUSB0'; fi)
18 18
#
19 19
#
20 20
###################################
......
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' | cut -d" " -f$(shell if uname -s |grep -i w32 >/dev/null; then echo '15'; else echo '8'; fi) > 1.tmp
362
BSSSIZE = avr-size -A main.elf | grep 'bss' | cut -d" " -f$(shell if uname -s |grep -i w32 >/dev/null; then echo '16'; else echo '9'; fi) > 2.tmp
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
363 363
ADD = expr `cat 1.tmp` + `cat 2.tmp` > 3.tmp
364 364
CLEANSIZE = rm 1.tmp 2.tmp 3.tmp
365 365
checksize:

Also available in: Unified diff