summaryrefslogtreecommitdiff
path: root/src/util/check-avr-mem
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2012-09-12 20:01:22 -0600
committerBdale Garbee <bdale@gag.com>2012-09-12 20:01:22 -0600
commit3b612efcd1dddc6a3d59012f7ed57754b1f798c2 (patch)
tree18d50713491ef96c5c127a309f870efb6c33f98d /src/util/check-avr-mem
parente076773c1693e2a62bb828dee71c04c20dbab0a5 (diff)
parent01eb36408d7e0e826b431fcc1d3b2deb23607e0b (diff)
Merge branch 'new-debian' into debian
Conflicts: ChangeLog debian/altos.install debian/changelog debian/control debian/copyright debian/dirs debian/docs debian/menu debian/rules src/Makefile
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);
+} }'