Topic : No Stack Space Warning

Forum : ST7/STM8

Original Post
Post Information Post
September 29, 2014 - 4:54am
Guest

Hi,I am getting a compiler warning when I change the compiler from Lv1 Optimisation to Lv3 (highest optimisation) that says the following

Replies
Post Information Post
+1
0
-1
September 29, 2014 - 11:08am
Raisonance Support Team

Hello,

Your message has been snipped, could you post it again?
Sorry for the disagreement.

Best Regards,

+1
0
-1
September 29, 2014 - 11:15pm
Guest

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

    +1
    0
    -1
    October 2, 2014 - 5:24pm
    Raisonance Support Team

    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,