From: prabal Date: Fri, 27 Apr 2007 05:01:25 +0000 (+0000) Subject: Allows proper generation of tos_image.xml. X-Git-Tag: release_tools_1_2_4_1~201 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=a2dd3b54e2acc6f8ea0545177200428a440e732e Allows proper generation of tos_image.xml. - 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. --- diff --git a/support/make/Makedefaults b/support/make/Makedefaults index bfb5ec08..de4f4d07 100644 --- a/support/make/Makedefaults +++ b/support/make/Makedefaults @@ -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 diff --git a/support/make/tos_image.extra b/support/make/tos_image.extra index b058ccff..d8a67f29 100644 --- a/support/make/tos_image.extra +++ b/support/make/tos_image.extra @@ -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 diff --git a/tools/tinyos/misc/tos-write-image.in b/tools/tinyos/misc/tos-write-image.in index 387c4685..d177a7fe 100644 --- a/tools/tinyos/misc/tos-write-image.in +++ b/tools/tinyos/misc/tos-write-image.in @@ -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() { } close(EXE); $ident_flags{"deluge_support"} = $deluge_support; +$ident_flags{"platform"} = $platform; open ( IHEX, $ihex ) or die "Cannot open ihex file: $!\n";