X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=support%2Fmake%2Fmsp%2Fmsp.rules;h=b052feb364d88c48a1b8ef0a29fcf23a504a5b94;hb=bf2b0de8125634c3cb1187ddf2a078a7ee08cf7c;hp=f1d4e6aef511774e44179fc6b5d1580c3e204432;hpb=5c6a127eb0cad10e45e2cad8cd245f85469994aa;p=tinyos-2.x.git diff --git a/support/make/msp/msp.rules b/support/make/msp/msp.rules index f1d4e6ae..b052feb3 100644 --- a/support/make/msp/msp.rules +++ b/support/make/msp/msp.rules @@ -7,7 +7,6 @@ define MSP_HELP debug : compile with minimal optimization and debug symbols debugopt : compile with debug symbols - xnp : compile for network programming Programmer options: @@ -23,14 +22,14 @@ endef HELP += $(MSP_HELP) ifdef MAKE_DEPUTY_FLAG - NCC_SAFE_TINYOS_FLAG = -safe + NCC_SAFE_TINYOS_FLAGS = -DSAFE_TINYOS -I$(TOSDIR)/lib/safe -fnesc-deputy -fnesc-deputy-args='-I$(TOSDIR)/lib/safe/include --FLIDs=build/$(PLATFORM)/flids.txt --envmachine -DSAFE_TINYOS --nolib ' else - NCC_SAFE_TINYOS_FLAG = + NCC_SAFE_TINYOS_FLAGS = endif #MSP_NESC_TARGET ?= msp430 #MSP_GCC ?= msp430-gcc -#MSP_MCU ?= msp430x149 +#MSP_MCU ?= msp430f149 #PFLAGS += -fnesc-target=$(MSP_NESC_TARGET) -gcc=$(MSP_GCC) -mmcu=$(MSP_MCU) OBJCOPY = msp430-objcopy @@ -39,7 +38,12 @@ SET_ID = tos-set-symbols NCC = ncc LIBS = -lm -AMADDR = ActiveMessageAddressC\$$addr +# Use __ as the separator - requires nesC 1.2.9 or later +ifneq ($(filter sim,$(GOALS)),sim) + PFLAGS += -fnesc-separator=__ +endif + +AMADDR = ActiveMessageAddressC__addr BUILDDIR ?= build/$(PLATFORM) MAIN_EXE = $(BUILDDIR)/main.exe MAIN_IHEX = $(BUILDDIR)/main.ihex @@ -64,13 +68,19 @@ $(if $(PROGRAM),,$(call TOSMake_include,msp/$(DEFAULT_PROGRAM).extra)) # Build storage file if volumes.xml present ifneq ($(wildcard $(VOLUME_FILE)), ) -exe0: $(BUILDDIR)/StorageVolumes.h +build_storage: $(BUILDDIR)/StorageVolumes.h + +exe0: build_storage VOLUME_ALLOCATOR_FLAGS ?= $(BUILDDIR)/StorageVolumes.h: $(VOLUME_FILE) $(VOLUME_ALLOCATOR) $(VOLUME_ALLOCATOR_FLAGS) $(PLATFORMDIR) <$(VOLUME_FILE) >$@ || rm -f $@ PFLAGS += -I$(BUILDDIR) +else + +build_storage: + endif ifndef BUILD_DEPS @@ -96,7 +106,7 @@ exe: exe0 bytes FORCE exe0: builddir $(BUILD_EXTRA_DEPS) FORCE @echo " compiling $(COMPONENT) to a $(PLATFORM) binary" - $(NCC) -o $(MAIN_EXE) $(NCC_SAFE_TINYOS_FLAG) $(OPTFLAGS) $(PFLAGS) $(CFLAGS) $(WIRING_CHECK_FLAGS) $(COMPONENT).nc $(LIBS) $(LDFLAGS) + $(NCC) -o $(MAIN_EXE) $(NCC_SAFE_TINYOS_FLAGS) $(OPTFLAGS) $(PFLAGS) $(CFLAGS) $(WIRING_CHECK_FLAGS) $(COMPONENT).nc $(LIBS) $(LDFLAGS) ifdef WIRING_CHECK_FILE @nescc-wiring $(WIRING_CHECK_FILE) endif