2012-01-18 15:27:59 +00:00
|
|
|
# $Id: Makefile.z1,v 1.4 2010/11/07 08:40:24 enricmcalvo Exp $
|
|
|
|
# msp430flasher -n msp430x5437 -w "Firmware.txt" -v -z [VCC]
|
|
|
|
|
2013-12-12 19:45:45 +00:00
|
|
|
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 \
|
2013-05-24 07:21:53 +00:00
|
|
|
core/net/llsec dev/cc2420
|
2013-12-02 11:11:26 +00:00
|
|
|
|
2012-01-18 15:27:59 +00:00
|
|
|
ifdef IAR
|
2012-03-08 21:39:53 +00:00
|
|
|
CFLAGS+=-e --vla -Ohz --multiplier=32 --multiplier_location=4C0 --hw_workaround=CPU40 --core=430X --data_model small --double=32 -D__MSP430F5438A__=1
|
2012-01-18 15:27:59 +00:00
|
|
|
#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
|
2012-03-08 21:39:53 +00:00
|
|
|
@echo make program.upload IAR=1 - uses the IAR compiler instead of mspgcc
|
2012-01-18 15:27:59 +00:00
|
|
|
@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
|
|
|
|
|
2012-05-17 15:27:50 +00:00
|
|
|
ifeq ($(UIP_CONF_IPV6),1)
|
2012-01-18 15:27:59 +00:00
|
|
|
CFLAGS += -DWITH_UIP6=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
CONTIKI_TARGET_SOURCEFILES += $(ARCH) $(UIPDRIVERS)
|
|
|
|
|
|
|
|
ifdef IAR
|
2012-04-10 14:05:10 +00:00
|
|
|
MCU=msp430f5438a
|
2012-01-18 15:27:59 +00:00
|
|
|
else
|
2012-04-10 14:05:10 +00:00
|
|
|
MCU=msp430f5438
|
2012-01-18 15:27:59 +00:00
|
|
|
endif
|
2014-04-14 08:30:39 +00:00
|
|
|
|
|
|
|
# Platform has a MSP430X MCU with 20-bit support
|
|
|
|
CPU_HAS_MSP430X=1
|
|
|
|
|
2012-01-18 15:27:59 +00:00
|
|
|
include $(CONTIKI)/cpu/msp430/Makefile.msp430
|
|
|
|
|
|
|
|
contiki-$(TARGET).a: ${addprefix $(OBJECTDIR)/,symbols.o}
|
|
|
|
# $(AR) rcf $@ $^
|
|
|
|
|
|
|
|
|
|
|
|
ifdef IAR
|
2012-09-19 20:49:19 +00:00
|
|
|
LDFLAGSNO += -xm "$(IAR_PATH)/lib/dlib/dl430xsfn.r43" -f "$(IAR_PATH)/config/lnk430f5437.xcl"
|
2012-03-08 21:39:53 +00:00
|
|
|
LDFLAGS += $(LDFLAGSNO) -Felf -yn
|
|
|
|
endif
|
2012-01-18 15:27:59 +00:00
|
|
|
|
|
|
|
%.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]
|