75 lines
2 KiB
Makefile
75 lines
2 KiB
Makefile
SENSORS = sensors.c sht11.c
|
|
MSB = dma.c infomem.c node-id.c \
|
|
msb430-uart1.c rs232.c \
|
|
cc1020.c cc1020-uip.c adc.c \
|
|
msb430-slip-arch.c sd.c sd-arch.c \
|
|
cfs-coffee.c cfs-coffee-arch.c
|
|
|
|
CONTIKI_TARGET_DIRS = . dev apps loader
|
|
ifndef CONTIKI_TARGET_MAIN
|
|
CONTIKI_TARGET_MAIN = contiki-msb430-main.c
|
|
endif
|
|
|
|
CONTIKI_TARGET_SOURCEFILES += $(SENSORS) $(MSB) $(CONTIKI_TARGET_MAIN)
|
|
|
|
MCU=msp430f1612
|
|
include $(CONTIKI)/cpu/msp430/Makefile.msp430
|
|
|
|
contiki-$(TARGET).a: ${addprefix $(OBJECTDIR)/,symbols.o}
|
|
# $(AR) rcf $@ $^
|
|
|
|
ifndef BASE_IP
|
|
BASE_IP := 172.16.1.1
|
|
endif
|
|
|
|
### System dependent Makefile
|
|
|
|
ifeq ($(HOST_OS),FreeBSD)
|
|
# settings for FreeBSD
|
|
-include $(CONTIKI)/platform/$(TARGET)/buildscripts/Makefile.freebsd
|
|
else
|
|
ifeq ($(HOST_OS),Windows)
|
|
# settings for Windows
|
|
-include $(CONTIKI)/platform/$(TARGET)/buildscripts/Makefile.win
|
|
else
|
|
# settings for an arbitary unix-like platform
|
|
-include $(CONTIKI)/platform/$(TARGET)/buildscripts/Makefile.unix
|
|
endif
|
|
endif
|
|
|
|
# If we are not running under Windows, we assume Linux
|
|
ifndef MOTELIST
|
|
USBDEVPREFIX=
|
|
SERIALDUMP = $(CONTIKI)/tools/sky/serialdump-linux
|
|
MOTELIST = $(CONTIKI)/tools/sky/motelist-linux
|
|
MOTES = $(shell $(MOTELIST) 2>&- | grep USB | \
|
|
cut -f 4 -d \ | \
|
|
perl -ne 'print $$1 . " " if(m-(/dev/\w+)-);')
|
|
CMOTES=$(MOTES)
|
|
endif
|
|
|
|
msb-motelist:
|
|
$(MOTELIST)
|
|
msb-motes:
|
|
@echo $(MOTES)
|
|
|
|
ifdef MOTE
|
|
serialdump:
|
|
$(SERIALDUMP) -b115200 $(USBDEVPREFIX)$(word $(MOTE), $(CMOTES)) | $(CONTIKI)/tools/timestamp | tee serialdump-`date +%Y%m%d-%H%M`
|
|
|
|
serialview:
|
|
$(SERIALDUMP) -b115200 $(USBDEVPREFIX)$(word $(MOTE), $(CMOTES)) | $(CONTIKI)/tools/timestamp
|
|
|
|
login:
|
|
$(SERIALDUMP) -b115200 $(USBDEVPREFIX)$(word $(MOTE), $(CMOTES))
|
|
else
|
|
serialdump:
|
|
$(SERIALDUMP) -b115200 $(USBDEVPREFIX)$(firstword $(CMOTES)) | $(CONTIKI)/tools/timestamp | tee serialdump-`date +%Y%m%d-%H%M`
|
|
|
|
serialview:
|
|
$(SERIALDUMP) -b115200 $(USBDEVPREFIX)$(firstword $(CMOTES)) | $(CONTIKI)/tools/timestamp
|
|
|
|
login:
|
|
$(SERIALDUMP) -b115200 $(USBDEVPREFIX)$(firstword $(CMOTES))
|
|
endif
|