Different value to clear initial register area

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
Post Reply
steved
Posts: 834
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 138 times

Different value to clear initial register area

Post by steved »

This relates to the option to initialise stack areas. I hope I've correctly understood how Chibi works.
When a new thread is started, the registers appear to be loaded from the stack area, so all contain the stack initialisation value.
A fair number of registers are rarely used (if ever), so the stack initialisation value appears quite frequently between top of stack and lowest used location.
For speed, I use a binary search to establish available stack space, and that gets confused!
Would it be possible to initialise the top n bytes of the stack with a different value to avoid this problem?
Post Reply