altos/avr: Must leave space for init stack in ram
authorKeith Packard <keithp@keithp.com>
Wed, 12 Oct 2011 00:45:51 +0000 (18:45 -0600)
committerKeith Packard <keithp@keithp.com>
Wed, 12 Oct 2011 00:57:32 +0000 (18:57 -0600)
The stack used during system initialization lives at the top of RAM,
so leave some space for that.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/util/check-avr-mem

index c73edbd1e8f88ca1d3cda2f697b0a1b9312fe981..7956f0aa91ba4d9d84934bef576dc9a55e01649d 100644 (file)
@@ -2,8 +2,10 @@
 nm "$@" |
 grep ' N _end' |
 awk '{ iram = strtonum("0x" $1) % 0x10000;
-if ( iram > 0xaff) {
-       printf ("%d bytes of ram more than %d available\n", iram, 0xaff);
+if ( iram > 0xacf) {
+       printf ("%d bytes of ram more than %d available\n", iram, 0xacf);
        exit(1);
-} else
-       exit(0); }'
+} else {
+       printf("%d bytes of ram\n", iram);
+       exit(0);
+} }'