The most common way to determine the deepest stack usage is to initialize the stack memory with some known but unusual value, then periodically (or at the end of a big test run) see where that pattern stops.
This is exactly how the IAR IDE determines the amount of stack used.