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).
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)
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
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)
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