Forum : ST7/STM8
Original Post
Post Information | Post |
---|---|
September 29, 2014 - 4:54am
|
Hi,I am getting a compiler warning when I change the compiler from Lv1 Optimisation to Lv3 (highest optimisation) that says the following |
Hello,
Your message has been snipped, could you post it again?
Sorry for the disagreement.
Best Regards,
Hi,
I am getting a compiler warning when I change the compiler from Lv1 Optimisation to Lv3 (highest optimisation) that says the following "*** WARNING C258 IN LINE 723 OF : No more space on stack to store Common Sub Expression in 'ProcessReceivedMessage'"
I then increase the stack size from 0x200 to 0x400 (double) but the warning still remains.
I only get this message when I add in deep structure references to the code such as
"pTSC->Motor
.TraveltimeCurrentLookupProfile[index2][index3]"
Any help on the reason for this message would be greatly appreciated,
Jesse
hello,
In case your project uses lots of common subexpressions, the optimizer will store them on stack. In case it runs out of stack space for Common subexpressions with a Warning C258, you can take advantage of the STACKSPACEFOREXP directive to enlarge the stack space dedicated to Common Sub-Expression storage.
Please, read the information in the STM8/ST7 compiler manual (RCSTM8.pdf you can find in Ride\Doc directory) at page 128.
Hope it helps.
Best regards,