From ef43d8fb12cc8031a55e460f06d7fe6d3a2f690c Mon Sep 17 00:00:00 2001 From: klueska Date: Tue, 11 Mar 2008 08:28:54 +0000 Subject: [PATCH] Changed bsl.exra to search for the string between the commas and not short circuiting after seeing a digit when installing to some default tty device. Also added some more variables to the avr.rules and msp430.rules to allow more flexibility in the way the tos-storage-XXX scripts are invoked --- support/make/avr/avr.rules | 5 +++-- support/make/msp/bsl.extra | 4 ++-- support/make/msp/msp.rules | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/support/make/avr/avr.rules b/support/make/avr/avr.rules index 67d0a47f..ce0f17ba 100644 --- a/support/make/avr/avr.rules +++ b/support/make/avr/avr.rules @@ -36,7 +36,6 @@ PROGRAMMER ?= uisp NCC = ncc LIBS = -lm - AMADDR = ActiveMessageAddressC\$$addr # Uncomment the next two lines if you have a toolchain without the dollar sign # patch. This needs nesc 1.2.8 or newer (1.2.9 is recommended). @@ -48,6 +47,8 @@ MAIN_SREC = $(BUILDDIR)/main.srec MAIN_IHEX = $(BUILDDIR)/main.ihex INSTALL_SREC = $(MAIN_SREC).out$(if $(NODEID),-$(NODEID),) VOLUMEFILE = volumes-at45db.xml +VOLUME_ALLOCATOR = tos-storage-at45db +VOLUME_ALLOCATOR_FLAGS ?= PFLAGS += -Wall -Wshadow $(NESC_FLAGS) PFLAGS += -target=$(PLATFORM) -fnesc-cfile=$(BUILDDIR)/app.c -board=$(SENSORBOARD) @@ -96,7 +97,7 @@ ifneq ($(wildcard $(VOLUMEFILE)), ) exe0: $(BUILDDIR)/StorageVolumes.h $(BUILDDIR)/StorageVolumes.h: $(VOLUMEFILE) - tos-storage-at45db $(PLATFORMDIR) <$(VOLUMEFILE) >$@ || rm -f $@ + $(VOLUME_ALLOCATOR) $(PLATFORMDIR) $(VOLUME_ALLOCATOR_FLAGS) <$(VOLUMEFILE) >$@ || rm -f $@ PFLAGS += -I$(BUILDDIR) endif diff --git a/support/make/msp/bsl.extra b/support/make/msp/bsl.extra index 747e15f3..07db9ced 100644 --- a/support/make/msp/bsl.extra +++ b/support/make/msp/bsl.extra @@ -20,9 +20,9 @@ BSL ?= auto MSP_BSL_FLAGS ?= --telos ifeq ($(BSL),auto) -BSLTEST = $(shell motelist -c | perl -e '<> =~ /^[^,]+,(\S+?(\d+))/; print $$1;' ) +BSLTEST = $(shell motelist -c | perl -e '<> =~ /^[^,]+,(\S+),/; print $$1;' ) BSLTEST_COMMENT = "using bsl,auto" -BSL = $(shell motelist -c | perl -e '<> =~ /^[^,]+,(\S+?(\d+))/; ($$s,$$n)=($$1,$$2); if($$s=~/^com/i) { print $$n-1 } else { print $$s; };' ) +BSL = $(shell motelist -c | perl -e '<> =~ /^[^,]+,(\S+),/; ($$s,$$n)=($$1,$$2); if($$s=~/^com/i) { print $$n-1 } else { print $$s; };' ) BSL_TARGETS += bsltest else ifeq ($(BSL:ref,%=ref),ref) diff --git a/support/make/msp/msp.rules b/support/make/msp/msp.rules index 88124647..276fadb7 100644 --- a/support/make/msp/msp.rules +++ b/support/make/msp/msp.rules @@ -66,8 +66,9 @@ $(if $(PROGRAM),,$(call TOSMake_include,msp/$(DEFAULT_PROGRAM).extra)) ifneq ($(wildcard $(VOLUME_FILE)), ) exe0: $(BUILDDIR)/StorageVolumes.h +VOLUME_ALLOCATOR_FLAGS ?= $(BUILDDIR)/StorageVolumes.h: $(VOLUME_FILE) - $(VOLUME_ALLOCATOR) $(PLATFORMDIR) <$(VOLUME_FILE) >$@ || rm -f $@ + $(VOLUME_ALLOCATOR) $(PLATFORMDIR) $(VOLUME_ALLOCATOR_FLAGS) <$(VOLUME_FILE) >$@ || rm -f $@ PFLAGS += -I$(BUILDDIR) endif -- 2.39.2