Where is the stackpointer?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Where is the stackpointer?

1,387 Views
cimbom
Contributor I
Hi,

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

CodeWarrior 8.1

Thx
Labels (1)
0 Kudos
Reply
1 Reply

240 Views
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 Kudos
Reply