-
Notifications
You must be signed in to change notification settings - Fork 0
/
patch_msp
20 lines (19 loc) · 855 Bytes
/
patch_msp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- ./platform/wismote/Makefile.wismote
+++ ./platform/wismote/Makefile.wismote
@@ -36,6 +36,17 @@ include $(CONTIKI)/cpu/msp430/Makefile.msp430
ifdef IAR
LDFLAGSNO += -B -xm "$(IAR_PATH)/lib/dlib/dl430xsfn.r43" -f "$(IAR_PATH)/config/lnk430f5437.xcl" -l contiki-$(TARGET).map -s __program_start -D_STACK_SIZE=80 -D_DATA16_HEAP_SIZE=80 -D_DATA20_HEAP_SIZE=80
LDFLAGS += $(LDFLAGSNO) -Felf -yn
+else # IAR
+
+ifndef MSPGCC_VERSION
+ MSPGCC_VERSION := ${shell $(CC) -dumpversion}
+endif
+
+ifneq (,$(findstring 4.7.,$(MSPGCC_VERSION)))
+# 20 bits flags for compilation (supported from mspgcc 4.7.0)
+ CFLAGS += -mmemory-model=large -mcode-region=far -mdata-region=far -msr20 -mc20 -md20
+ LDFLAGS += -mmemory-model=large -mcode-region=far -mdata-region=far -msr20 -mc20 -md20
+endif
endif
contiki-$(TARGET).a: ${addprefix $(OBJECTDIR)/,symbols.o}