cancel
Showing results for 
Search instead for 
Did you mean: 

Can stack pointer be change its original range?

vega
Associate II
Posted on August 17, 2006 at 05:58

Can stack pointer be change its original range?

4 REPLIES 4
vega
Associate II
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...

wolfgang2399
Associate II
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

emmanuel23
Associate II
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.

vega
Associate II
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.