2010-12-04 09:22:10 +01:00
|
|
|
CONTIKI_TARGET_DIRS = . dev dev/sensors
|
|
|
|
CONTIKI_CORE=contiki-micaz
|
|
|
|
CONTIKI_TARGET_MAIN = ${CONTIKI_CORE}.o
|
|
|
|
|
|
|
|
SENSOR_BOARD_SOURCEFILES = mts300.c
|
|
|
|
|
|
|
|
CONTIKI_TARGET_SOURCEFILES += adc.c rs232.c cfs-eeprom.c contiki-micaz-main.c \
|
2011-07-17 03:36:35 +02:00
|
|
|
leds-arch.c init-net.c node-id.c \
|
|
|
|
spi.c rtimer-arch.c ds2401.c \
|
2010-12-04 09:22:10 +01:00
|
|
|
battery-sensor.c slip.c slip_uart0.c
|
|
|
|
CONTIKI_TARGET_SOURCEFILES += $(SENSOR_BOARD_SOURCEFILES)
|
|
|
|
|
|
|
|
CONTIKIAVR=$(CONTIKI)/cpu/avr
|
|
|
|
CONTIKIBOARD=.
|
|
|
|
|
2011-07-17 03:36:35 +02:00
|
|
|
ifeq ($(SUBTARGET),)
|
|
|
|
SUBTARGET=MICAZ
|
|
|
|
endif
|
|
|
|
CFLAGS += -DSUBTARGET=$(SUBTARGET)
|
2010-12-04 09:22:10 +01:00
|
|
|
|
|
|
|
include $(CONTIKIAVR)/Makefile.avr
|
|
|
|
|
2011-07-17 03:36:35 +02:00
|
|
|
ifeq ($(SUBTARGET),MICAZ)
|
|
|
|
CONTIKI_TARGET_SOURCEFILES += cc2420.c cc2420-arch.c clock-micaz.c
|
|
|
|
# MicaZ runs on Clock rate 7.3728 MHz
|
|
|
|
CONTIKI_PLAT_DEFS = -DF_CPU=7372800UL -DAUTO_CRC_PADDING=2
|
|
|
|
MCU=atmega128
|
|
|
|
endif
|
|
|
|
ifeq ($(SUBTARGET),IRIS)
|
|
|
|
CONTIKI_TARGET_SOURCEFILES += clock.c
|
|
|
|
# IRIS runs on Clock rate 8 MHz
|
|
|
|
CONTIKI_PLAT_DEFS = -DF_CPU=8000000UL -DAUTO_CRC_PADDING=2 #-DUSART_BAUD_115200
|
|
|
|
MCU=atmega1281
|
|
|
|
include $(CONTIKIAVR)/radio/Makefile.radio
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
AVRDUDE_OPTIONS=-V
|
|
|
|
AVRDUDE_PROGRAMMER=mib510
|
|
|
|
#AVRDUDE_PROGRAMMER=jtag2
|
|
|
|
#AVRDUDE_PORT=usb
|
|
|
|
AVRDUDE_PORT=$(PORT)
|
|
|
|
|
|
|
|
|
2010-12-04 09:22:10 +01:00
|
|
|
|
|
|
|
%.od: %.$(TARGET)
|
|
|
|
avr-objdump -zhD $< > $@
|
|
|
|
|
|
|
|
|
|
|
|
ifndef WINDIR
|
|
|
|
ifdef OS
|
|
|
|
ifneq (,$(findstring Windows,$(OS)))
|
|
|
|
WINDIR := Windows
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PRGBOARD), )
|
|
|
|
PRGBOARD = mib510
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PORT), )
|
|
|
|
ifndef WINDIR
|
2011-07-17 03:36:35 +02:00
|
|
|
#PORT = /dev/ttyS0
|
|
|
|
PORT = /dev/ttyUSB0
|
2010-12-04 09:22:10 +01:00
|
|
|
else
|
|
|
|
PORT = COM1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
PRGBOARD_FILE = $(CONTIKI)/platform/$(TARGET)/buildscripts/Makefile.$(PRGBOARD)
|
|
|
|
HAVE_PRGBOARD_FILE = $(wildcard $(PRGBOARD_FILE))
|
|
|
|
|
|
|
|
ifneq ($(strip $(HAVE_PRGBOARD_FILE)), )
|
|
|
|
include $(PRGBOARD_FILE)
|
|
|
|
endif
|
|
|
|
|
2011-07-17 03:36:35 +02:00
|
|
|
ifdef UIP_CONF_IPV6
|
|
|
|
CFLAGS += -DWITH_UIP6=1
|
|
|
|
endif
|
|
|
|
|