Thanks to a ll replies.
1. malloc:
Help, who's calling malloc and how do we track that down? In the objdump file we can't find the call to malloc using grep. Yes we're using the standard libraries. We are using sin, cos and atan functions.
2. stack usage:
The code is not called more that 4 deep. The stack set in the hardware is 31 deep. From the memory dump it looks like the stack is being rolled out of the hardware and into the RAM. Disabling the CWP manager will probably just crash the system. but it's a test to run.