Forum Discussion
Altera_Forum
Honored Contributor
21 years agoProblem with eCos stack and data corruption
Hi! I've been fooling with stack and data corruption for a long time. Now I've decided to run the eCos tests, and I've seen that some of them don't work, and I've fou...
Altera_Forum
Honored Contributor
21 years agoI've got to confess that I always test eCos on hardware, rather than through the ISS. However after a cursory glance through the code, it seems that there is an assumption that all memory is initialised to zero within the stack checking part of this test. This is what's probably causing the problem in the ISS, because it's (rightly) saying that the memory is actually uninitialised.
It looks like you might be able to solve the problem by turning on CYGFUN_KERNEL_THREADS_STACK_CHECKING. This should make sure that the stack contents are explicitly initialised. The code to look at is contained in stackmon.h.