How can i read sp of s12zvl 32

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How can i read sp of s12zvl 32

ソリューションへジャンプ
743件の閲覧回数
ahnjoseph
Contributor III

How can i read a SP of s12zvl32

 

I need monitor a SP for protection of Stack overflow

ラベル(1)
1 解決策
617件の閲覧回数
MJW
NXP Employee
NXP Employee

Hello,

assuming I understand the requirement correctly, the code to read the

current stack-pointer would look similar to this:

/*declaration*/

void *copy_of_stack_ptr;

...

     /*copy stack pointer*/

     asm {

          ST     S,copy_of_stack_ptr

     }

...

HTH,

MJW

元の投稿で解決策を見る

2 返答(返信)
618件の閲覧回数
MJW
NXP Employee
NXP Employee

Hello,

assuming I understand the requirement correctly, the code to read the

current stack-pointer would look similar to this:

/*declaration*/

void *copy_of_stack_ptr;

...

     /*copy stack pointer*/

     asm {

          ST     S,copy_of_stack_ptr

     }

...

HTH,

MJW

617件の閲覧回数
ahnjoseph
Contributor III

Thank you So much !

Now, I can do reading a stack ADDR.

0 件の賞賛