Forum Discussion
Altera_Forum
Honored Contributor
16 years agoGet stack top/bottom pointers at run time?
Hi folks- I want to write a stack test function to detemine stack usage during run time testing. For that I need to be able to get stack top and bottom pointers at run time. Can anyone p...
Altera_Forum
Honored Contributor
16 years ago --- Quote Start --- There's already a feature that does this... See attached image from the BSP Editor. There is a similar option in the Nios II IDE's Syslib configuration stuff. The actual compile-time changes are mentioned in the attached image, as well. --- Quote End --- That's a good one that I'll certainly put into use. However I'm looking for a way to know the stack usage at any time before jumping to the exception handler. My stack test function will allow me to gauge stack usage during field stress testing. Exception trapping after stack overflow won't allow me to continue. John Speth.