Where is the stackpointer?

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

Where is the stackpointer?

1,387 次查看
cimbom
Contributor I
Hi,

where can I watch/see/activate the stackpointer?
I can't find the stackpointer anywhere..

CodeWarrior 8.1

Thx
标签 (1)
0 项奖励
回复
1 回复

240 次查看
J2MEJediMaster
Specialist I
It would help if you told us the MCU you were targeting. I'll try to give you a general answer.

In your project you'll find a file generated by te CodeWarrior project wizard that's called startup,c startup.asm or something similar. (The name depends upon the MCU you're targeting.) This file, as its name implies,  is responsbile for getting the MCU kicked-started by initializing many of the processor registers and certain peripherals. If you're using a high-level language like C, it also sets up the runtime environment to support the language. If you study the code in this file, you should see where it sets up the stack pointer, along with everything else it does.

---Tom
0 项奖励
回复