This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Why do cflags have heap and stack size

I have inherited a project where the Makefile sets __HEAP_SIZE and __STACK_SIZE for both CFLAGS and ASMFLAGS:

CFLAGS += -D__STACK_SIZE=2048
CFLAGS += -D__HEAP_SIZE=0
ASMFLAGS += -D__STACK_SIZE=2048
ASMFLAGS += -D__HEAP_SIZE=0

Looking at samle Makefiles from the SDK I see the same (but only for __HEAP_SIZE). But the only place I can find that use __HEAP_SIZE and __STACK_SIZE is in the .s files. Does anyone know a case where the __STACK_SIZE and __HEAP_SIZE in CFLAGS is used?

Related