Put a function into the stack

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

Put a function into the stack

4,342件の閲覧回数
Saga
Contributor II
Hi to all, i was wondering is there any way to put a function into the stack? This function (as you may guess) is for writing into the flash.

Thanks for your help!
ラベル(1)
0 件の賞賛
返信
6 返答(返信)

1,625件の閲覧回数
tonyp
Senior Contributor II

See the example code given in Fig. 4-12 of the HCS08 Family Reference Manual.

0 件の賞賛
返信

1,625件の閲覧回数
Saga
Contributor II
Is this reference manual supposed to be with codewarrior? or where can i find it...? Thank you
0 件の賞賛
返信

1,625件の閲覧回数
Geezer
Contributor I
0 件の賞賛
返信

1,625件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

There are some technical notes on this topic.

TN 235: Running Portion of the Application from Stack
TN 228: Running Portion of the Application in RAM

Daniel

 

TN228.pdf

TN235.pdf

Message Edited by t.dowe on 2009-09-24 03:18 PM
0 件の賞賛
返信

1,625件の閲覧回数
Geezer
Contributor I
Putting a function on the stack is equivalent to placing it in RAM, so here's another way:
Define an array of RAM bytes, copy down the routine bytes from your ROM space, in C-code use an "__asm JSR xxxx" to that location.
0 件の賞賛
返信

1,625件の閲覧回数
Saga
Contributor II
Thank you geezer, i would like to know how can i know (from code) which is the size of the function i want to put into the RAM. Yes im using C language. Thank you!
0 件の賞賛
返信