DEFAULT_PROGRAM = dapa
endif
-BUILDLESS_DEPS += bytes
+BUILDLESS_DEPS += bytes
ifndef NOWIRING
include $(TINYOS_MAKE_PATH)/wiring.extra
srec: exe FORCE
$(OBJCOPY) --output-target=srec $(MAIN_EXE) $(MAIN_SREC)
+tos_buildinfo: ihex build_buildinfo FORCE
+ @:
+
tosimage: ihex build_tosimage FORCE
@:
setid: FORCE
@cmd () { echo "$$@"; $$@; }; if [ x = x$(NODEID) ]; then cmd cp $(MAIN_IHEX) $(INSTALL_IHEX); else cmd $(SET_ID) --objcopy $(OBJCOPY) --objdump $(OBJDUMP) --target ihex $(MAIN_IHEX) $(INSTALL_IHEX) TOS_NODE_ID=$(NODEID) $(AMADDR)=$(NODEID); fi
+tos_buildinfo: ihex build_buildinfo FORCE
+ @:
+
tosimage: ihex build_tosimage FORCE
@:
--- /dev/null
+#-*-Makefile-*- vim:syntax=make
+#$Id$
+
+TOS_BUILDINFO_PL ?= tos-write-buildinfo
+IDENT_PROGRAM_NAME ?= $(COMPONENT)
+
+build_buildinfo: FORCE
+ @echo " writing TOS buildinfo"
+ @$(TOS_BUILDINFO_PL) $(IDENT_FLAGS) --exe="$(MAIN_EXE)" --size="$(SIZE)" --platform="$(PLATFORM)" > $(BUILDDIR)/tos_buildinfo.xml
tinyos/misc/tos-ident-flags
tinyos/misc/tos-install-jni
tinyos/misc/tos-set-symbols
+ tinyos/misc/tos-write-buildinfo
tinyos/misc/tos-write-image
tinyos/misc/tos-storage-at45db
tinyos/misc/tos-storage-stm25p
tos-mviz \
tos-serial-configure \
tos-set-symbols \
+ tos-write-buildinfo \
tos-write-image \
tos-check-env \
tos-storage-stm25p \
--- /dev/null
+#!@pathperl@ -w
+#
+# This script generates an XML description of the buildinformation. This is
+# primarily used by other tools such as checkers, tests and continuous
+# integration.
+#
+#$Id$
+#@author Jan Beutel <j.beutel@ieee.org>
+#
+use strict;
+
+my $MaxNameLength = 10;
+
+if ( @ARGV == 0 ) {
+ print "usage: tos-write-buildinfo [ident_flags] [exe_file]\n";
+ exit 0;
+}
+
+my %ident_flags = ();
+my $exe = "";
+my $size = "avr-size";
+my $platform = "";
+
+for my $arg (@ARGV) {
+ if ($arg =~ /^-DIDENT_(.+)=0x(.+)$/) {
+ $ident_flags{lc($1)} = uc($2);
+ }
+ elsif ($arg =~ /^-DIDENT_(.+)="(.+)"$/) {
+ $ident_flags{lc($1)} = $2;
+ }
+ elsif ($arg =~ /^--exe=(.+)$/) {
+ $exe = $1;
+ }
+ elsif ($arg =~ /^--size=(.+)$/) {
+ $size = $1;
+ }
+ elsif ($arg =~ /^--platform=(.+)$/) {
+ $platform = $1;
+ }
+}
+
+
+my @text;
+my $rc2 = qx"$size $exe |grep main ";
+#print $rc2;
+print $size;
+@text = split(' ', $rc2);
+
+print "<metrics>\n";
+print " <ram>";
+print $text[1];
+print "<ram>\n";
+print " <flash>";
+print $text[0];
+print "<flash>\n";
+print " <stack>";
+print $text[2];
+print "<stack>\n";
+print "</metrics>\n";