Skip to main content
Visitor II
August 17, 2006
Question

Can stack pointer be change its original range?

  • August 17, 2006
  • 4 replies
  • 1120 views
Posted on August 17, 2006 at 05:58

Can stack pointer be change its original range?

    This topic has been closed for replies.

    4 replies

    vegaAuthor
    Visitor II
    August 11, 2006
    Posted on August 11, 2006 at 08:19

    I am a beginner with ST7.I want to change the range of the stack pointer.

    How can i do to change the range from 0x100 to 0x1bf?

    Thank you for helping...

    Visitor II
    August 11, 2006
    Posted on August 11, 2006 at 12:57

    Hi Vega,

    you can find a lot of suggestions in this forum. Simply go to field

    Search in the forums

    and insert

    stack.

    Select the forum ST7 as filter then - if you like.

    I'm sure that you'll find a lot of useful information there.

    Regards

    WoRo

    Visitor II
    August 16, 2006
    Posted on August 16, 2006 at 11:59

    Hi Vega,

    The range of the stack is hard coded in each ST7.

    So, you cannot change the high value (which is typically 0x1FF or 0x17F depending on the variant).

    However, if you know that your application won't use so much stack, you can declare a part of the stack as RAM (from 0x100 to a value you must evaluate, in order to make sure that the ST7 won't override it).

    In order to evaluate the maximum size of the stack needed by your application, you can find some information in the map file of the compiler, or use your debug tool in order to measure it dynamically (may need several iterations).

    Emmanuel.

    vegaAuthor
    Visitor II
    August 17, 2006
    Posted on August 17, 2006 at 05:58

    Thank you for helping.I will test my application to know how much stack space be used.