Updated to make use of the tmote-bsl instead of msp430-bsl (needed for the Sentilla JCreate) if it exists
This commit is contained in:
parent
fdf5836763
commit
e70b45c102
1 changed files with 19 additions and 23 deletions
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile.sky,v 1.19 2009/01/15 21:07:03 adamdunkels Exp $
|
||||
# $Id: Makefile.sky,v 1.20 2009/01/15 22:12:46 adamdunkels Exp $
|
||||
|
||||
|
||||
ARCH=msp430.c leds.c watchdog.c light.c spi.c ds2411.c \
|
||||
|
@ -21,19 +21,6 @@ include $(CONTIKI)/cpu/msp430/Makefile.msp430
|
|||
contiki-$(TARGET).a: ${addprefix $(OBJECTDIR)/,symbols.o}
|
||||
# $(AR) rcf $@ $^
|
||||
|
||||
BSL=msp430-bsl
|
||||
|
||||
ifndef COMPORT
|
||||
COMPORT := /dev/ttyUSB0
|
||||
endif
|
||||
|
||||
#-include $(CONTIKI)/tools/sky/Makefile
|
||||
|
||||
%.u: %.ihex
|
||||
$(BSL) --telosb -D -c $(COMPORT) -r -e -I -p $<
|
||||
|
||||
%.send: %.ce
|
||||
$(CONTIKI)/tools/codeprop 192.168.1.2 $<
|
||||
|
||||
NUMPAR=20
|
||||
IHEXFILE=tmpimage.ihex
|
||||
|
@ -44,10 +31,18 @@ ifdef OS
|
|||
USBDEVPREFIX=/dev/com
|
||||
SERIALDUMP = $(CONTIKI)/tools/sky/serialdump-windows
|
||||
MOTELIST = $(CONTIKI)/tools/sky/motelist-windows
|
||||
BSL = $(CONTIKI)/tools/sky/msp430-bsl-windows
|
||||
TMOTE_BSL=$(if $(wildcard $(CONTIKI)/tools/sky/tmote-bsl.exe),1,0)
|
||||
ifeq ($(TMOTE_BSL), 1)
|
||||
BSL = $(CONTIKI)/tools/sky/tmote-bsl
|
||||
MOTES = $(shell $(MOTELIST) | grep COM | \
|
||||
cut -f 4 -d \ )
|
||||
else
|
||||
BSL = $(CONTIKI)/tools/sky/msp430-bsl-windows --telosb
|
||||
BSL_FILETYPE = -I
|
||||
MOTES = $(shell $(MOTELIST) | grep COM | \
|
||||
cut -f 4 -d \ | \
|
||||
perl -ne 'print $$1 - 1 . " " if(/COM(\d+)/);')
|
||||
endif
|
||||
CMOTES = $(shell $(MOTELIST) | grep COM | \
|
||||
cut -f 4 -d \ | \
|
||||
perl -ne 'print $$1 . " " if(/COM(\d+)/);')
|
||||
|
@ -59,7 +54,8 @@ ifndef MOTELIST
|
|||
USBDEVPREFIX=
|
||||
SERIALDUMP = $(CONTIKI)/tools/sky/serialdump-linux
|
||||
MOTELIST = $(CONTIKI)/tools/sky/motelist-linux
|
||||
BSL = $(CONTIKI)/tools/sky/msp430-bsl-linux
|
||||
BSL = $(CONTIKI)/tools/sky/msp430-bsl-linux --telosb
|
||||
BSL_FILETYPE = -I
|
||||
MOTES = $(shell $(MOTELIST) 2>&- | grep USB | \
|
||||
cut -f 4 -d \ | \
|
||||
perl -ne 'print $$1 . " " if(m-(/dev/\w+)-);')
|
||||
|
@ -89,14 +85,14 @@ sky-reset-sequence: $(foreach PORT, $(MOTES), $(PORT).sky-r)
|
|||
|
||||
%.sky-u:
|
||||
@echo +++++ Erasing $(basename $@) ; \
|
||||
$(BSL) --telosb -c $(basename $@) -e && sleep 2 ; \
|
||||
$(BSL) -c $(basename $@) -e && sleep 2 ; \
|
||||
echo +++++ Programming $(basename $@) ; \
|
||||
$(BSL) --telosb -c $(basename $@) -I -p $(IHEXFILE) && sleep 2 ; \
|
||||
$(BSL) -c $(basename $@) $(BSL_FILETYPE) -p $(IHEXFILE) && sleep 2 ; \
|
||||
echo +++++ Resetting $(basename $@) ; \
|
||||
$(BSL) --telosb -c $(basename $@) -r
|
||||
$(BSL) -c $(basename $@) -r
|
||||
|
||||
%.sky-r:
|
||||
$(BSL) --telosb -c $(basename $@) -r
|
||||
$(BSL) -c $(basename $@) -r
|
||||
|
||||
sizeplot:
|
||||
msp430-size $(OBJECTDIR)/*.o | $(CONTIKI)/tools/sky/check-size > size-data
|
||||
|
|
Loading…
Reference in a new issue