]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tools/tinyos/misc/tos-write-image.in
Allows proper generation of tos_image.xml.
[tinyos-2.x.git] / tools / tinyos / misc / tos-write-image.in
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";