]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Allows proper generation of tos_image.xml.
authorprabal <prabal>
Fri, 27 Apr 2007 05:01:25 +0000 (05:01 +0000)
committerprabal <prabal>
Fri, 27 Apr 2007 05:01:25 +0000 (05:01 +0000)
- fixes a small mistake in support/make/Makedefaults that
  prevents the generation on ident information
- updates support/make/tos_image.extra and tools/tinyos/misc/tos-write-image.in
  to allow generation of the platform information in the tos_image.xml.

support/make/Makedefaults
support/make/tos_image.extra
tools/tinyos/misc/tos-write-image.in

index bfb5ec0827fa2884abc1d2b2706220473641b793..de4f4d07c569c417709b52a2869cee8410844d1e 100644 (file)
@@ -4,7 +4,7 @@
 DEFAULT_LOCAL_GROUP ?= 0x7d
 OPTFLAGS ?= -Os
 NESC_FLAGS ?= -Wnesc-all
-GOALS += tos-ident-flags tos_image
+GOALS += ident_flags tos_image
 
 define DEFAULT_HELP
 
index b058ccffd20c5f9abc3a14b0bf75ec782509754d..d8a67f29ea7eecaa58fa210b03c8906016ff01f4 100644 (file)
@@ -6,4 +6,4 @@ IDENT_PROGRAM_NAME ?= $(COMPONENT)
 
 build_tosimage: FORCE
        @echo "    writing TOS image"
-       @$(TOS_IMAGE_PL) $(IDENT_FLAGS) --ihex="$(MAIN_IHEX)" --exe="$(MAIN_EXE)" --objdump="$(OBJDUMP)" > $(BUILDDIR)/tos_image.xml
+       @$(TOS_IMAGE_PL) $(IDENT_FLAGS) --ihex="$(MAIN_IHEX)" --exe="$(MAIN_EXE)" --objdump="$(OBJDUMP)" --platform="$(PLATFORM)" > $(BUILDDIR)/tos_image.xml
index 387c46854389a8acb8e86668195702151542e573..d177a7fe14f5ab495dcf226df02c8cc7d6e9087f 100644 (file)
@@ -20,12 +20,13 @@ my %ident_flags = ();
 my $exe = "";
 my $ihex = "";
 my $objdump = "avr-objdump";
+my $platform = "";
 
 for my $arg (@ARGV) {
   if ($arg =~ /^-DIDENT_(.+)=0x(.+)$/) {
     $ident_flags{lc($1)} = uc($2);
   }
-  elsif ($arg =~ /^-DIDENT_(.+)=(.+)$/) {
+  elsif ($arg =~ /^-DIDENT_(.+)="(.+)"$/) {
     $ident_flags{lc($1)} = $2;
   }
   elsif ($arg =~ /^--ihex=(.+)$/) {
@@ -37,6 +38,9 @@ for my $arg (@ARGV) {
   elsif ($arg =~ /^--objdump=(.+)$/) {
     $objdump = $1;
   }
+  elsif ($arg =~ /^--platform=(.+)$/) {
+    $platform = $1;
+  }
 }
 
 my $deluge_support = "no";
@@ -49,6 +53,7 @@ while(<EXE>) {
 }
 close(EXE);
 $ident_flags{"deluge_support"} = $deluge_support;
+$ident_flags{"platform"} = $platform;
 
 open ( IHEX, $ihex ) or die "Cannot open ihex file: $!\n";