Made the stack and heap size configurable when using the IAR compiler on the MSP430 platforms
This commit is contained in:
parent
919ddfbf09
commit
4630945475
6 changed files with 19 additions and 6 deletions
|
@ -72,6 +72,20 @@ CFLAGSNO = --dlib_config "$(IAR_PATH)/LIB/DLIB/dl430xlfn.h" $(CFLAGSWERROR)
|
|||
# CFLAGSNO = --dlib_config $(IAR_PATH)/LIB/DLIB/dl430xlfn.h -Ohz --multiplier=32 --multiplier_location=4C0 --hw_workaround=CPU40 --core=430X $(CFLAGSWERROR) --data_model large --double=32
|
||||
endif
|
||||
|
||||
LDFLAGSNO += -B -l contiki-$(TARGET).map -s __program_start
|
||||
# Stack and heap size in hex
|
||||
ifndef IAR_STACK_SIZE
|
||||
IAR_STACK_SIZE=300
|
||||
endif
|
||||
# Set this to a positive number (hex) to enable malloc/free with IAR compiler
|
||||
ifndef IAR_DATA16_HEAP_SIZE
|
||||
IAR_DATA16_HEAP_SIZE=100
|
||||
endif
|
||||
LDFLAGSNO += -D_STACK_SIZE=$(IAR_STACK_SIZE) -D_DATA16_HEAP_SIZE=$(IAR_DATA16_HEAP_SIZE)
|
||||
ifdef IAR_DATA20_HEAP_SIZE
|
||||
LDFLAGSNO += -D_DATA20_HEAP_SIZE=$(IAR_DATA20_HEAP_SIZE)
|
||||
endif
|
||||
|
||||
CUSTOM_RULE_C_TO_O = 1
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
|
|
@ -54,7 +54,7 @@ MCU=msp430f149
|
|||
include $(CONTIKI)/cpu/msp430/Makefile.msp430
|
||||
|
||||
ifdef IAR
|
||||
LDFLAGSNO += -B -xm "$(IAR_PATH)/lib/dlib/dl430fn.r43" -f "$(IAR_PATH)/config/lnk430f149.xcl" -l contiki-$(TARGET).map -s __program_start -D_STACK_SIZE=80 -D_DATA16_HEAP_SIZE=80 -D_DATA20_HEAP_SIZE=80
|
||||
LDFLAGSNO += -xm "$(IAR_PATH)/lib/dlib/dl430fn.r43" -f "$(IAR_PATH)/config/lnk430f149.xcl"
|
||||
LDFLAGS += $(LDFLAGSNO) -Felf -yn
|
||||
endif # IAR
|
||||
|
||||
|
|
|
@ -58,8 +58,7 @@ contiki-$(TARGET).a: ${addprefix $(OBJECTDIR)/,symbols.o}
|
|||
|
||||
|
||||
ifdef IAR
|
||||
STACKSIZE=300
|
||||
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=$(STACKSIZE) -D_DATA16_HEAP_SIZE=$(STACKSIZE) -D_DATA20_HEAP_SIZE=$(STACKSIZE)
|
||||
LDFLAGSNO += -xm "$(IAR_PATH)/lib/dlib/dl430xsfn.r43" -f "$(IAR_PATH)/config/lnk430f5437.xcl"
|
||||
LDFLAGS += $(LDFLAGSNO) -Felf -yn
|
||||
endif
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ contiki-$(TARGET).a: ${addprefix $(OBJECTDIR)/,symbols.o}
|
|||
|
||||
|
||||
ifdef IAR
|
||||
LDFLAGSNO += -B -xm "$(IAR_PATH)/lib/dlib/dl430fn.r43" -f "$(IAR_PATH)/config/lnk430f1611.xcl" -l contiki-$(TARGET).map -s __program_start -D_STACK_SIZE=80 -D_DATA16_HEAP_SIZE=80 -D_DATA20_HEAP_SIZE=80
|
||||
LDFLAGSNO += -xm "$(IAR_PATH)/lib/dlib/dl430fn.r43" -f "$(IAR_PATH)/config/lnk430f1611.xcl"
|
||||
LDFLAGS += $(LDFLAGSNO) -Felf -yn
|
||||
endif # IAR
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ MCU=msp430f5437
|
|||
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
|
||||
LDFLAGSNO += -xm "$(IAR_PATH)/lib/dlib/dl430xsfn.r43" -f "$(IAR_PATH)/config/lnk430f5437.xcl"
|
||||
LDFLAGS += $(LDFLAGSNO) -Felf -yn
|
||||
endif
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ include $(CONTIKI)/cpu/msp430/Makefile.msp430
|
|||
|
||||
# Add LDFLAGS after IAR_PATH is set
|
||||
ifdef IAR
|
||||
LDFLAGSNO += -B -xm "$(IAR_PATH)/lib/dlib/dl430xsfn.r43" -f "$(IAR_PATH)/config/lnk430f2617.xcl" -l contiki-$(TARGET).map -s __program_start -D_STACK_SIZE=80 -D_DATA16_HEAP_SIZE=80 -D_DATA20_HEAP_SIZE=80
|
||||
LDFLAGSNO += -xm "$(IAR_PATH)/lib/dlib/dl430xsfn.r43" -f "$(IAR_PATH)/config/lnk430f2617.xcl"
|
||||
LDFLAGS += $(LDFLAGSNO) -Felf -yn
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue