From b80f8ffb61566cbd134c399ea6ccf9290075490b Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 11 Oct 2011 18:45:51 -0600 Subject: [PATCH] altos/avr: Must leave space for init stack in ram The stack used during system initialization lives at the top of RAM, so leave some space for that. Signed-off-by: Keith Packard --- src/util/check-avr-mem | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/util/check-avr-mem b/src/util/check-avr-mem index c73edbd1..7956f0aa 100644 --- a/src/util/check-avr-mem +++ b/src/util/check-avr-mem @@ -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); +} }' -- 2.30.2