Hello
On the XGATE side, the way the stack start address is defined depends on the core you are using.
On XGATE V3 core, there are 2 stacks and stack start addresses are specified in registers XGISP31 & XGISP74.
On earlier release of the XGATE, the stack start address is specified by option -Cstv.
To check for stack overflow, I see 2 solutions:
1- Fill the stack area with a specific pattern and run your application.
After a while stop application and check how far the stack is growing.
2- You may want to set a watchpoint on the lowest byte of the stack.
Then run your application and application will stop if you are accessing this memory cell.
This should be working on both XGATE or HCS12 side.
CrasyCat