This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

stack

In keil uvision51 IDE how we will set the starting stackpointer? Is it possible to set it on target settings? If so how?

Parents
  • As Erik points out, your question is not complete. The device hardware will initialize the stack pointer to the last byte of the Register Bank 0. If you invoke any Register bank usage, Keil's startup code will advance the stack pointer to the last byte of last register bank. Then if you define any Bdata useage, Keil will adjust the stack pointer to skip over the Bdata area. So you see we have no real answer to your question unless we know what problem you have.
    Please remember the C51 stack is NOT a PC stack. Keil mainly uses the stack to pass a limit number of arguments and housekeeping for interrupt handling and function calls.
    Bradford

Reply
  • As Erik points out, your question is not complete. The device hardware will initialize the stack pointer to the last byte of the Register Bank 0. If you invoke any Register bank usage, Keil's startup code will advance the stack pointer to the last byte of last register bank. Then if you define any Bdata useage, Keil will adjust the stack pointer to skip over the Bdata area. So you see we have no real answer to your question unless we know what problem you have.
    Please remember the C51 stack is NOT a PC stack. Keil mainly uses the stack to pass a limit number of arguments and housekeeping for interrupt handling and function calls.
    Bradford

Children