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-mem11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/util/check-avr-mem b/src/util/check-avr-mem
new file mode 100644
index 00000000..7956f0aa
--- /dev/null
+++ b/src/util/check-avr-mem
@@ -0,0 +1,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);
+} }'