To reduce stack size do not declare local variables in main(). Since main() is a function they would be allocated on the stack.
The stack-size of a PSoC5 can be set at compile-time and so can be increased as needed and is set initially to 16K!!!. The problem of stack overflow in a PSoC5 environment is minimal if not non-existing (as long as the program behaves "normal").
Stack overflow is more a problem for PSoC1 or PSoC3 which both have a stacksize of 256 bytes only and is not adjustable.
These are few good coding practices which are to be followed..............