summaryrefslogtreecommitdiff
path: root/src/util/check-avr-mem
blob: 7956f0aa91ba4d9d84934bef576dc9a55e01649d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
nm "$@" |
grep ' N _end' |
awk '{ iram = strtonum("0x" $1) % 0x10000;
if ( iram > 0xacf) {
	printf ("%d bytes of ram more than %d available\n", iram, 0xacf);
	exit(1);
} else {
	printf("%d bytes of ram\n", iram);
	exit(0);
} }'