osd-contiki/platform/exp5438/Makefile.exp5438

81 lines
2.4 KiB
Makefile

# $Id: Makefile.z1,v 1.4 2010/11/07 08:40:24 enricmcalvo Exp $
# msp430flasher -n msp430x5437 -w "Firmware.txt" -v -z [VCC]
MODULES += core/net core/net/ip core/net/ipv6 core/net/ipv4 \
core/net/mac core/net/rpl core/net/rime core/net/mac/contikimac \
dev/cc2420
ifdef IAR
CFLAGS+=-e --vla -Ohz --multiplier=32 --multiplier_location=4C0 --hw_workaround=CPU40 --core=430X --data_model small --double=32 -D__MSP430F5438A__=1
#CFLAGS+=--no_cse --no_unroll --no_inline --no_code_motion --no_tbaa --debug -D__MSP430F5438A__ -e --double=32 --dlib_config 'C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0 Evaluation\430\LIB\DLIB\dl430xsfn.h' --core=430X --data_model=small -Ol --multiplier=32 --multiplier_location=4C0 --hw_workaround=CPU40
endif
CLEAN += *.exp5438 symbols.c symbols.h
ARCH=msp430.c leds.c watchdog.c \
spix.c cc2420.c cc2420-arch.c \
rtimer-arch.c node-id.c leds-arch.c uart1x.c lcd.c \
hal_lcd.c hal_lcd_fonts.c duty-cycle-scroller.c cfs-ram.c
ifeq ($(WITH_SLIP),1)
ARCH += slip_uart0.c
else
ARCH += uart1-putchar.c
endif
ifdef NODEID
CFLAGS+=-DNODEID=$(NODEID)
ifdef BURN_NODEID
CFLAGS+=-DBURN_NODEID
endif # BURN_NODEID
endif # NODEID
help:
@echo A few useful make commands:
@echo make help - shows this help
@echo make TARGET=exp5438 savetarget - stores selection of target to avoid using TARGET= on every make invokation
@echo make program.upload - compiles and uploads program to connected board
@echo make program.upload IAR=1 - uses the IAR compiler instead of mspgcc
@echo make program.upload NODEID=x - uploads with node_id set to x
CONTIKI_TARGET_DIRS = . dev apps net
ifndef CONTIKI_TARGET_MAIN
CONTIKI_TARGET_MAIN = contiki-exp5438-main.c
endif
ifeq ($(UIP_CONF_IPV6),1)
CFLAGS += -DWITH_UIP6=1
endif
CONTIKI_TARGET_SOURCEFILES += $(ARCH) $(UIPDRIVERS)
ifdef IAR
MCU=msp430f5438a
else
MCU=msp430f5438
endif
# Platform has a MSP430X MCU with 20-bit support
CPU_HAS_MSP430X=1
include $(CONTIKI)/cpu/msp430/Makefile.msp430
contiki-$(TARGET).a: ${addprefix $(OBJECTDIR)/,symbols.o}
# $(AR) rcf $@ $^
ifdef IAR
LDFLAGSNO += -xm "$(IAR_PATH)/lib/dlib/dl430xsfn.r43" -f "$(IAR_PATH)/config/lnk430f5437.xcl"
LDFLAGS += $(LDFLAGSNO) -Felf -yn
endif
%.hex: %.ihex
mv $< $@
%.upload: %.hex
msp430flasher -n msp430x5438a -e ERASE_MAIN -w $< -v -z [VCC]
%.upload-clean: %.hex
msp430flasher -n msp430x5438a -w $< -v -z [VCC]