Stack size

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Stack size

跳至解决方案
533 次查看
Brax02
Contributor III

I have a question regarding the stack in the MC9S08SG16

 

The total size RAM is 1024 bytes. It starts from the address 0x80 until 0x047F.

 

To initilized the stack pointer I used the follwing asm cmd

 

     LDHX #RamEnd+1 ;point one past RAM

    TXS ;SP<-(H:X-1)

 

In the file MC9S08SG16.inc RamEnd is defined like that :

 

RAMEnd:           equ   $0000027F

 

 

My question is why it's not $0000047F ?

标签 (1)
0 项奖励
1 解答
424 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello:

No problem. Yes, it was likely an error with the included file . You may use the one I attached.

Regards :smileyhappy:

/Jorge Gonzalez

在原帖中查看解决方案

0 项奖励
3 回复数
424 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Brax02:

Where did you get that include file? I assume it was included automatically by some of the CodeWarrior versions maybe?

I checked the file included with CodeWarrior v10.5 and it actually indicates the next:

RAMEnd:       equ  $0000047F

I attach here the file I am talking about so you can compare it with the one you have.

Hope this is useful!

/Jorge Gonzalez

424 次查看
Brax02
Contributor III

Hello Jorge,

Thanks for your answer !

Yes the file is automatically included. I used the CodeWarriorIDE version 5.9.0

It's probably a mistake.

0 项奖励
425 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello:

No problem. Yes, it was likely an error with the included file . You may use the one I attached.

Regards :smileyhappy:

/Jorge Gonzalez

0 项奖励