This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Data stack pointer on C55x



Hello,

I am having an issue with my CALL and RET commands. I first check 0xffff00 and see that the stack mode is 10b (32-bit stack with slow return, which is the default). Then I load my code in and use GEL to set the stack pointers to a known value (0x100 in DATA for both SP and SSP in my case). I have a simple program running which calls two subroutines and then returns. When the first subroutine is called, SP and SSP both decrease as expected, but when I check the address, the return value was not stored. The same thing occurs for the next subroutine, and when the RET command is called, it grabs whatever value was left in the address pointed to by SP, which is junk because it was never written to, and returns there. At this point, the PC is at some random value which is bad. I know that the RET value is working correctly because if I fill in the location with a random address before RET, it will jump to that address as expected. The main issue here is CALL not loading anything into the stack.

Do you have any insight as to what could be happening?