Allow reprogramming invidual nodes with 'make file.upload MOTE=x' where x is the mote number just like with make login

This commit is contained in:
adamdunkels 2009-10-29 22:10:21 +00:00
parent a45aa8e89c
commit f03caa357e

View file

@ -1,4 +1,4 @@
# $Id: Makefile.sky,v 1.27 2009/08/25 16:24:49 adamdunkels Exp $ # $Id: Makefile.sky,v 1.28 2009/10/29 22:10:21 adamdunkels Exp $
ARCH=msp430.c leds.c watchdog.c light.c spi.c ds2411.c \ ARCH=msp430.c leds.c watchdog.c light.c spi.c ds2411.c \
@ -79,9 +79,15 @@ sky-motelist:
sky-motes: sky-motes:
@echo $(MOTES) @echo $(MOTES)
ifdef MOTE
%.upload: %.ihex
cp $< $(IHEXFILE)
$(MAKE) sky-u.$(subst /,-,$(word $(MOTE), $(MOTES)))
else # MOTE
%.upload: %.ihex %.upload: %.ihex
cp $< $(IHEXFILE) cp $< $(IHEXFILE)
$(MAKE) sky-reset sky-upload $(MAKE) sky-reset sky-upload
endif # MOTE
sky-upload: sky-reset sky-upload: sky-reset
$(MAKE) -j $(NUMPAR) sky-upload-sequence $(MAKE) -j $(NUMPAR) sky-upload-sequence