May i know how to enable stack consumption for coldfire v4 ?
Thanks & regards,
ramya
Hello,
You can see the linker file to see which stack size is assigned to v4.
Regards
You might do better to ask your question in a CodeWarrior forum. This forum is specifically for the ColdFire chips. Are you using one of them?
I've used older chips where the compiler provides a report of stack consumption for each function, and also knows which functions call what other ones. That way (as long as you're not using function pointers) it can work out the "maximum depth" for "main()", and separately for interrupt routines. Then you add the "deepest" for your stack consumption.
I don't know if CodeWarrior does that. It might of might not.
The ColdFIre chips can be used in complicated ways that makes this sort of thing not work (function pointers, registered callbacks and so on). They also have seven interrupt priority levels, so you can have interrupts interrupting other ones. That increases the stack consumption in ways that the programmer has to work out the worse case.
The other way of doing this is to fill the stack with a pattern like "0x5555" and then run the program with as many things happening (network, disk, interrupts, display, USB) as possible. Then examine the stack and see how "deep" the program has been be looking for the "lowest overwrite" in the pattern. Then add a margin as it may go deeper.
Tom