8.4.2 --defsym=_min_stack_size=size

The default linker script provides a minimum stack size of 1024 bytes. Use the --defsym option to define the _min_stack_size symbol to change this default size value. Note that the actual effective stack size may be larger than the minimum size.

xc32-gcc foo.c -Wl,--defsym=_min_stack_size=1536