summaryrefslogtreecommitdiff
path: root/src/util/check-avr-mem
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/check-avr-mem')
-rw-r--r--src/util/check-avr-mem9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/check-avr-mem b/src/util/check-avr-mem
new file mode 100644
index 00000000..c73edbd1
--- /dev/null
+++ b/src/util/check-avr-mem
@@ -0,0 +1,9 @@
+#!/bin/sh
+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);
+ exit(1);
+} else
+ exit(0); }'