Made the stack and heap size configurable when using the IAR compiler on the MSP430 platforms

This commit is contained in:
Niclas Finne 2012-09-19 22:49:19 +02:00
parent 919ddfbf09
commit 4630945475
6 changed files with 19 additions and 6 deletions

View file

@ -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 $@